[GRASS-dev] Rast_open_update?

Huidae Cho grass4u at gmail.com
Thu Jun 26 16:45:35 PDT 2014


Hi Soeren,

Ah! You're right.

Cell files have pointers to rows in the header, so maybe, we could
implement functions that can copy multiple rows at a time without
uncompressing/compressing them row by row even if MASK may not be applied
properly. This is not a true update, but at least copy can be more
efficient than now.

Regards,
Huidae


On Thu, Jun 26, 2014 at 9:30 AM, Sören Gebbert <soerengebbert at googlemail.com
> wrote:

> Hi Huidae,
> FWIK, the reason why updating raster maps is currently not supported
> in GRASS at the module level is the storage format. Usually raster
> maps are stored using zip compressed rows. Rows are written in serial,
> hence if you modify a single row, the size of this row may be
> different after compression and does not fit exactly in the position
> of the old row in the existing file. From my knowledge there is
> currently no way to append rows or mark rows as invalid in existing
> raster maps.
> However, there is the possibility to store raster maps using
> uncompressed rows, but i don't recall any raster library function to
> update such maps.
>
> Best regards
> Soeren
>
> 2014-06-26 15:05 GMT+02:00 Huidae Cho <grass4u at gmail.com>:
> > Whenever I change a couple of cells in an existing raster map, I have to
> > create a new raster map and patch the old and new maps, which can take
> long
> > because r.patch has to read and write the entire map.
> >
> > There are Rast_open_old/new, but no Rast_open_update and AFAIK there are
> no
> > raster modules that directly update existing raster maps. I don't know
> why.
> > I thought it would be great if there was Rast_open_update so we can
> update
> > existing raster maps without creating a temp map and patching it.
> >
> >
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140626/8f7d36ab/attachment-0001.html>


More information about the grass-dev mailing list