#2296: r.stream.* - unify some functions (avoid code duplication)
-------------------------+--------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.stream.* | Platform: All
Cpu: All |
-------------------------+--------------------------------------------------
the r.stream.*-modules were recently added to trunk.
to avoid code duplication, some functions should be unified over these
modules in a lib(?) because following files are the same over all
r.stream.*-modules:
#2296: r.stream.* - unify some functions (avoid code duplication)
-------------------------+--------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.stream.* | Platform: All
Cpu: All |
-------------------------+--------------------------------------------------
Comment(by glynn):
Replying to [ticket:2296 hellik]:
> to avoid code duplication, some functions should be unified over these
modules in a lib(?)
While we're at it, maybe we should look into unifying all of the different
"segment" libraries.
They all do essentially the same thing: provide a 2-dimensional array
which may be too large to fit into RAM (or, more accurately, into the
process' address space; if RAM was the issue, mmap() etc would suffice),
and which can be accessed (more or less) randomly.
Apart from the "official" segment library (lib/segment), r.proj has its
own, r.stream.* each have their own, r.grow.distance has something simpler
(the temporary file is read row-by-row but in reverse).
#2296: r.stream.* - unify some functions (avoid code duplication)
-------------------------+--------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.stream.* | Platform: All
Cpu: All |
-------------------------+--------------------------------------------------
Comment(by hellik):
Replying to [comment:1 glynn]:
> Replying to [ticket:2296 hellik]:
>
> > to avoid code duplication, some functions should be unified over these
modules in a lib(?)
>
> While we're at it, maybe we should look into unifying all of the
different "segment" libraries.
>
> They all do essentially the same thing: provide a 2-dimensional array
which may be too large to fit into RAM (or, more accurately, into the
process' address space; if RAM was the issue, mmap() etc would suffice),
and which can be accessed (more or less) randomly.
>
> Apart from the "official" segment library (lib/segment), r.proj has its
own, r.stream.* each have their own, r.grow.distance has something simpler
(the temporary file is read row-by-row but in reverse).
#2296: r.stream.* - unify some functions (avoid code duplication)
-------------------------+--------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: major | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: r.stream.* | Platform: All
Cpu: All |
-------------------------+--------------------------------------------------
Changes (by neteler):
* milestone: 7.1.0 => 7.0.0
Comment:
Replying to [ticket:2296 hellik]:
> the r.stream.*-modules were recently added to trunk.
>
> to avoid code duplication, some functions should be unified over these
modules in a lib(?) because following files are the same over all
r.stream.*-modules
The io.c and files I had sync'ed in r60127. Not sure if it is worth to
move them into
an own library.
#2296: r.stream.* - unify some functions (avoid code duplication)
-------------------------+--------------------------------------------------
Reporter: hellik | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: major | Milestone: 7.0.0
Component: Addons | Version: svn-trunk
Keywords: r.stream.* | Platform: All
Cpu: All |
-------------------------+--------------------------------------------------
Changes (by neteler):
* component: Raster => Addons
Comment:
TODO for all r.stream.* modules (reported by mmetz in grass-dev):
Most importantly it is the NULL handling that needs to be fixed, and
synced between the ram and disk modes. More generally, the ram and
disk modes need to be synced and validated. For ease of maintenance,
the ram mode could be removed.