[GRASS-dev] In G7, v.category with option=transfer layer=1, 2 doesn't seem to be effective
Markus Metz
markus.metz.giswork at gmail.com
Fri May 17 13:51:04 PDT 2013
On Fri, May 17, 2013 at 4:18 PM, Nikos Alexandris
<nik at nikosalexandris.net> wrote:
> Nikos wrote:
>
> # hm? ok... let's "transfer" the layer 1 to layer 2, 3
> ## ...to "polygons_tmp" -- why is this required?
Because you want to create a new vector map.
> v.category polygons option=transfer layer=1,2,3 out=polygons_tmp
>
> Processing features...
> Copying attribute table(s)...
> Building topology for vector map <polygons_tmp at PERMANENT>...
> Registering primitives...
> 5 primitives registered
> 22 vertices registered
> Building areas...
> 100%
> 3 areas built
> 3 isles built
> Attaching islands...
> 100%
> Attaching centroids...
> 100%
> Number of nodes: 3
> Number of primitives: 5
> Number of points: 0
> Number of lines: 0
> Number of boundaries: 3
> Number of centroids: 2
> Number of areas: 3
> Number of isles: 3
> Categories copied from layer 1 to layer 1
> Categories copied from layer 1 to layer 2
> Categories copied from layer 1 to layer 3
> v.category complete. 5 features modified.
>
> # re-checking for connections
> v.db.connect polygons_tmp -p
>
> Vector map <polygons_tmp> is connected by:
> layer <1/test_polygones> table <polygons_tmp_test_polygones> in database
> </geo/grassdb/tests/vector_stats_for_multiple_cats/wgs84/PERMANENT/sqlite/sqlite.db>
> through driver <sqlite> with key <cat>
> layer <2/polygons_2> table <polygons_tmp_polygons_2> in database
> </geo/grassdb/tests/vector_stats_for_multiple_cats/wgs84/PERMANENT/sqlite/sqlite.db>
> through driver <sqlite> with key <cat>
>
> # and cats/layers
> v.category polygons_tmp option=report
>
> Layer/table: 2/polygons_tmp_polygons_2
> type count min max
> point 0 0 0
> line 0 0 0
This is a bug:
> boundary 3 1944966201 1944966201
fixed in r56286
> centroid 2 1 1
> area 2 1 1
> face 0 0 0
> kernel 0 0 0
> all 5 1 1944966201
In general, a layer is only added if categories for some vector
features are added to the new layer. After that, you might attach a
table to this new layer. Just attaching a table to a new layer does
not create a new layer. This should be explained in the vector
introduction [0].
Markus M
[0] http://grass.osgeo.org/grass70/manuals/vectorintro.html
More information about the grass-dev
mailing list