[GRASS5] [bug #863] (grass) 2 bugs in GIS lib: reclass maps

Request Tracker grass-bugs at intevation.de
Thu Nov 29 18:10:52 EST 2001


this bug's URL: http://intevation.de/rt/webrt?serial_num=863
-------------------------------------------------------------------------

Subject: 2 bugs in GIS lib: reclass maps

grass downloaded at: CVS Server, Germany

Hi again,

I have found two bugs in the GIS library: The reclass-test function is
not working properly when a raster and and vector map with identical
name exist (which is usually no problem). And you can't delete the base
map of a reclass map, if you first delete the reclass map (was reported in
RT as well). Please have a look at the situation:

My maps are:

g.list rast 
----------------------------------------------
raster files available in mapset user1:
muell

-> which is a common map (has been base to another, already deleted, reclass
map).
r.info muell

 | Title:    clump of vegcover in PERMANENT ( vegcover.clump )   
 |----------------------------------------------------------------
 |                                                                
 |   Type of Map:  raster              Number of Categories: 3230 
 |   Data Type:    CELL                                           


And there is:

g.list vect
----------------------------------------------
vector files available in mapset user1:
muell


Now it happens:

 g.remove vect=muell
[muell at user1] is a base map. Remove reclassed map first:
 vegcover.1000 at user1

Oops: I used "vect="!


strace g.remove vect=muell
[...]
close(3)                                = 0
munmap(0x40017000, 4096)                = 0
brk(0x8087000)                          = 0x8087000
open("/home/neteler/grassdata/spearfish/user1/cell_misc/muell/reclassed_to", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=20, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0
[...]

huh - this looks really nasty.

And, to make it complete:
g.remove rast=muell
[muell at user1] is a base map. Remove reclassed map first:
 vegcover.1000 at user1

Also not working as vegcover.1000 at user1 is already deleted (see above).
Reason is the left-over cell_misc/muell/reclassed_to which wasn't cleaned
up when I deleted vegcover.1000 at user1 (here the entry must be deleted, not the
file I guess as a map may be base for several reclass files).

So far my report. Again looking for a volunteer here (too complex for me).

BTW: I have resolved the reported g.mremove/mapset problem. It is updated
in CVS.

Best regards

 Markus
 

-------------------------------------------- Managed by Request Tracker



More information about the grass-dev mailing list