[GRASS-user] v.extract -d vs. v.dissolve
Nikos Alexandris
nikos.alexandris at felis.uni-freiburg.de
Sun Nov 9 18:48:58 EST 2008
On Sun, 2008-11-09 at 15:34 -0800, Hamish wrote:
> Nikos Alexandris
> > 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?
>
> is there a table attached?
>
>
> without specific details of command, map, and result it is rather hard to
> guess.....
>
>
> Hamish
Hamish,
apologies!
Here you go (working with grass-6.4.svn):
#info of vector map
v.info fgaps_shadows_singleid_patched_nik -c
Displaying column types/names for database connection of layer 1:
INTEGER|cat
INTEGER|value
CHARACTER|label
## column "value" contains just 1's, 2's, 3's, 4's and 5's
# dissolving
v.dissolve fgaps_shadows_singleid_patched_nik
out=fgaps_shadows_singleid_patched_nik_dissolved_test column=value
100%
Building topology for vector map
<fgaps_shadows_singleid_patched_nik_dissolved_test_14997>...
54377 primitives registered
629349 vertices registered
Building areas: 100%
38049 areas built
24046 isles built
Attaching islands: 100%
Attaching centroids: 100%
Topology was built
Number of nodes : 40374
Number of primitives: 54377
Number of points : 0
Number of lines : 0
Number of boundaries: 47093
Number of centroids : 7284
Number of areas : 38049
Number of isles : 24046
Number of areas without centroid : 30765
7284 features reclassed
Building topology for vector map
<fgaps_shadows_singleid_patched_nik_dissolved_test>...
54377 primitives registered
629349 vertices registered
Building areas: 100%
38049 areas built
24046 isles built
Attaching islands: 100%
Attaching centroids: 100%
Topology was built
Number of nodes : 40374
Number of primitives: 54377
Number of points : 0
Number of lines : 0
Number of boundaries: 47093
Number of centroids : 7284
Number of areas : 38049
Number of isles : 24046
Number of areas without centroid : 30765
Removing duplicate centroids...
Building topology for vector map
<fgaps_shadows_singleid_patched_nik_dissolved_test>...
54377 primitives registered
629349 vertices registered
Building areas: 100%
38049 areas built
24046 isles built
Attaching islands: 100%
Attaching centroids: 100%
Topology was built
Number of nodes : 40374
Number of primitives: 54377
Number of points : 0
Number of lines : 0
Number of boundaries: 47093
Number of centroids : 7284
Number of areas : 38049
Number of isles : 24046
Number of areas without centroid : 30765
# add table to database
v.db.addtable fgaps_shadows_singleid_patched_nik_dissolved_test
Using vector map name as table name:
fgaps_shadows_singleid_patched_nik_dissolved_test
Creating new DB connection based on default mapset settings...
Creating table with columns (cat integer)
The table <fgaps_shadows_singleid_patched_nik_dissolved_test> is now
part
of vector map <fgaps_shadows_singleid_patched_nik_dissolved_test> and
may
be deleted or overwritten by GRASS modules
Select privileges were granted on the table
Updating database...
100%
5 categories read from map
4 categories read from map don't exist in selection from table
4 records updated/inserted
Current attribute table links:
Vector map <fgaps_shadows_singleid_patched_nik_dissolved_test at nik> is
connected by:
layer <1> table <fgaps_shadows_singleid_patched_nik_dissolved_test> in
database </home/nik/grassdb/rlp_fgaps/gk2_option6/sqlite.db> through
driver <sqlite> with key <cat>
## only 4 records updated!? ##
# checking columns
v.info fgaps_shadows_singleid_patched_nik_dissolved_test -c
Displaying column types/names for database connection of layer 1:
INTEGER|cat
## why is the rest lost?
# using v.extract ## but this is probably not what I want. I need to
"dissolve" based on "value" column!
v.extract -d fgaps_shadows_singleid_patched_nik
out=fgaps_shadows_singleid_patched_nik_dissolved_test2
Building topology for vector map
<fgaps_shadows_singleid_patched_nik_dissolved_test2>...
54377 primitives registered
629349 vertices registered
Building areas: 100%
38049 areas built
24046 isles built
Attaching islands: 100%
Attaching centroids: 100%
Topology was built
Number of nodes : 40374
Number of primitives: 54377
Number of points : 0
Number of lines : 0
Number of boundaries: 47093
Number of centroids : 7284
Number of areas : 38049
Number of isles : 24046
Number of areas without centroid : 30765
v.extract complete.
Removing duplicate centroids...
Building topology for vector map
<fgaps_shadows_singleid_patched_nik_dissolved_test2>...
54377 primitives registered
629349 vertices registered
Building areas: 100%
38049 areas built
24046 isles built
Attaching islands: 100%
Attaching centroids: 100%
Topology was built
Number of nodes : 40374
Number of primitives: 54377
Number of points : 0
Number of lines : 0
Number of boundaries: 47093
Number of centroids : 7284
Number of areas : 38049
Number of isles : 24046
Number of areas without centroid : 30765
# checking columns
v.info fgaps_shadows_singleid_patched_nik_dissolved_test2 -c
Displaying column types/names for database connection of layer 1:
INTEGER|cat
INTEGER|value
CHARACTER|label
More information about the grass-user
mailing list