#2765 closed defect (fixed)
added "_1" to attribute table's name when working with v.overlay
Reported by: | lfurtkevicova | Owned by: | martinl |
---|---|---|---|
Priority: | normal | Milestone: | 7.2.0 |
Component: | Database | Version: | 7.0.1 |
Keywords: | database, v.overlay | Cc: | grass-dev@… |
CPU: | x86-64 | Platform: | Linux |
Description
Having two vector layers and overlay them with v.overlay; the result's attribute table name has "_1" after set map's name,i.e.
v.overlay ainput=A binput=B operator=or output=AB
attribute table's name: AB_1
It is not clear when one later works with Query ...
Change History (12)
comment:1 by , 9 years ago
Summary: | added "_1" to attribute table's name when working with v.overlay (OR ) → added "_1" to attribute table's name when working with v.overlay |
---|
comment:2 by , 9 years ago
Keywords: | database v.overlay added |
---|
comment:3 by , 9 years ago
comment:4 by , 9 years ago
The _<num>
postfix is added when the module creates output map with possibly more tables linked. But this is not the case of v.overlay
I would say. It needs some investigation but it seems to me that v.overlay
should create the output without the table postfix.
follow-up: 10 comment:7 by , 8 years ago
Currently v.overlay
chooses table name based on olayer
parameter. Eg.
1)
v.overlay ainput=boundary_state binput=geology operator=or output=AB --o olayer=1,0,0
will create table with name AB_1
.
2)
v.overlay ainput=boundary_state binput=geology operator=or output=AB --o olayer=0,1,0
will create table with name AB_boundary_state
.
3)
v.overlay ainput=boundary_state binput=geology operator=or output=AB --o olayer=0,0,1
will create table with name AB_geology
.
I changed v.overlay
in r69194 to create always table with the same name as output, so in the example above always table AB
. I am planning to backport this change to relbr72 if no objections.
comment:8 by , 8 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
follow-up: 11 comment:10 by , 8 years ago
Replying to martinl:
Currently
v.overlay
chooses table name based onolayer
parameter. Eg.1)
v.overlay ainput=boundary_state binput=geology operator=or output=AB --o olayer=1,0,0will create table with name
AB_1
.2)
v.overlay ainput=boundary_state binput=geology operator=or output=AB --o olayer=0,1,0will create table with name
AB_boundary_state
.3)
v.overlay ainput=boundary_state binput=geology operator=or output=AB --o olayer=0,0,1will create table with name
AB_geology
.I changed
v.overlay
in r69194 to create always table with the same name as output, so in the example above always tableAB
. I am planning to backport this change to relbr72 if no objections.
What are the results now with v.overlay olayer=0,1,2
and with with v.overlay olayer=1,2,3
?
follow-up: 12 comment:11 by , 8 years ago
Replying to mmetz:
What are the results now with
v.overlay olayer=0,1,2
and with withv.overlay olayer=1,2,3
?
What is the difference between olayer=0,1,2
, or olayer=1,2,3
and olayer=0,1,1
? The manuals just says "If of the olayer option is greater than 0..."? All (olayer=0,1,2
, olayer=1,2,3
and olayer=0,1,1
) commands produce just one table linked (tested with 7.0.5svn), so the MTABLE is not needed I would say. Is there any possibility that v.overlay
produces a map with more tables linked?
comment:12 by , 8 years ago
Replying to martinl:
Replying to mmetz:
What are the results now with
v.overlay olayer=0,1,2
and with withv.overlay olayer=1,2,3
?What is the difference between
olayer=0,1,2
, orolayer=1,2,3
andolayer=0,1,1
? The manuals just says "If of the olayer option is greater than 0..."? All (olayer=0,1,2
,olayer=1,2,3
andolayer=0,1,1
) commands produce just one table linked (tested with 7.0.5svn), so the MTABLE is not needed I would say. Is there any possibility thatv.overlay
produces a map with more tables linked?
The intention of the olayer option is to produce a map with zero to 3 layers, optionally with attribute tables. There were two bugs in v.overlay, preventing options like olayer=0,1,2
or olayer=1,2,3
to produce a map with multiple layers (to be precise, categories in multiple layers). Fixed in r69348-50 (trunk, relbr72, relbr70).
olayer=1,0,0
should produce new unique categories i output layer 1. olayer=0,1,2
should copy categories from ainput, alayer to output layer 1 and copy categories from binput, blayer to output layer 2, unique new categories are not created. olayer=1,2,3
should create unique new categories in output layer 1, copy categories from ainput, alayer to output layer 2 and copy categories from binput, blayer to output layer 3. olayer=0,1,1
should copy categories from ainput, alayer to output layer 1 and not copy categories from binput, blayer because the output layer numbers are identical.
What's the problem exactly? Is it behaving differently than the documentation says? Or the behavior should be different?