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

Hamish hamish_b at yahoo.com
Mon Nov 10 02:57:55 EST 2008


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)


> # 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.


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?


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



      



More information about the grass-user mailing list