[GRASS-user] d.rast.edit does not save edited cells (?)

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Thu Feb 21 20:55:21 EST 2008


On Fri, 2008-02-22 at 02:32 +0000, Glynn Clements wrote:
> Nikos Alexandris wrote:
> 
> > Hmmm... ! I though that it works as follows (and did):
> > 
> > 1. Open a raster and give a name for the new raster (open a raster with
> > areas, all having the same value "5")
> > 
> > 2. edit, save, exit (I "erased lots of pixels from various areas by
> > assigning the * -- that is NULL, no?)
> > 
> > 3. load the NEW raster and see the changes (I load the NEW raster and it
> > is identical with the old map)
> > 
> > 
> > Is it the * values? Effects take place with non-NULL values maybe?
> 
> Ah. I have just realised that d.rast.edit won't allow you to set cells
> to null.
> 
> The problem is this:
> 
> 
> d.rast.edit only works on a portion of the map (an editing window with
> 100,000 cells would consume vast amounts of memory and be
> impractically slow). When you save the map, or switch to a different
> portion, it imports the edited portion into grass as a separate map
> (using r.in.ascii), and merges it with rest of the map using r.patch.

Thanks for the details.
> 
> However, this only replaces non-null cells. Any null cells result in
> the corresponding cells in the orignal map remaining untouched.
> 
> I could fix d.rast.edit to use r.mapcalc instead of r.patch. But it
> might be better to add an option to r.patch to support this type of
> usage.

Would be nice to have that.

And another question: Is it possible to ad something else besides an
Aspect map? Use maybe transparencyt and a background command (like with
r.digit)? What are the limitations?

> 
> In the meantime, the only solution I can offer is to use a cell value
> which doesn't occur in the map being edited in place of the null
> value, then use r.null to change that value to null once editing is
> complete.
Yep, that's what I did ;-) 
I have specific codes (corresponding to land cover classes) so I used a
"strange" number and used r.null.
> 
-- 
Nikos Alexandris
.
Department of Remote Sensing & Landscape Information Systems
Faculty of Forestry & Environmental Sciences, Albert-Ludwigs-University Freiburg
.
Tel.  +49 (0) 761 203 3697 / Fax.  +49 (0) 761 203 3701 / Skype: Nikos.Alexandris
.
Address: Tennenbacher str. 4, D-79106 Freiburg i. Br., Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20080222/e57cdb71/attachment.bin


More information about the grass-user mailing list