[GRASS-user] v.extract -d vs. v.dissolve

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Mon Nov 10 06:09:41 EST 2008


On Sun, 2008-11-09 at 23:57 -0800, Hamish wrote:
> Nikos:
> > What could be the reason for v.dissolve failing to dissolve when
> > v.extract -d works just fine with the exact same vector maps? Bug?
> 
> [map sent]
> 
> what do you mean by "failing"? topology results seem the same before and
> after, ie there were no borders which needed to dissolve.  (v.info -t)
> 
> GRASS> v.report fgaps_shadows_singleid_patched_nik option=area | wc -l
> Displaying column types/names for database connection of layer 1:
> 7285
> 
> (so 7285 unique cat numbers in input map)

The reason I expect another result than just 4 big areas is that

 (a) I need single unique (=separate) "fagp" polygons (but not when they
are adjacent), 

 (b) I have done the exact same processing (v.dissolve based on "value"
column) on another vector map (actually the same "fgap" map with some
polygons removed manually and it just works fine. I'll check the
"numbers" on the other map.

(Sorry that I didn't mention the "other example" before.)

> 
> 
> > # dissolving
> > v.dissolve fgaps_shadows_singleid_patched_nik \
> >     out=fgaps_shadows_singleid_patched_nik_dissolved_test column=value
> 
> 
> GRASS> v.report fgaps_shadows_singleid_patched_nik_dissolved_test op=area
> cat|area
> 1|45302.399999782
> 2|257889.279999155
> 3|355739.519996849
> 4|111633.280001068
> 
> > ## only 4 records updated!? ##
> 
> "value" from input map has become "cat" in output map.
That's fine but I need lots of cat(s) around (to catch the mices) !! :-)
> 
> 
> v.dissolve "v.reclass"es it to make the "value" integer column the key
> column instead of "cat".
> 
> do you need to retain the original cat numbers?

yep!

> d.erase
> g.region vect=fgaps_shadows_singleid_patched_nik
> d.vect fgaps_shadows_singleid_patched_nik where='value = 1' color=red type=area fcol=red
> d.vect fgaps_shadows_singleid_patched_nik where='value = 2' color=yellow type=area fcol=yellow
> d.vect fgaps_shadows_singleid_patched_nik where='value = 3' color=cyan type=area fcol=cyan
> d.vect fgaps_shadows_singleid_patched_nik where='value = 4' color=blue type=area fcol=blue
> 
> # random colors all over the place
> d.vect -c fgaps_shadows_singleid_patched_nik type=area
> 
> # random colors by value ID
> d.vect -c fgaps_shadows_singleid_patched_nik_dissolved_test type=area
> 
> 
> Hamish

Kind regards, Nikos




More information about the grass-user mailing list