Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#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 lfurtkevicova, 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 lfurtkevicova, 9 years ago

Keywords: database v.overlay added

comment:3 by annakrat, 9 years ago

What's the problem exactly? Is it behaving differently than the documentation says? Or the behavior should be different?

comment:4 by martinl, 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.

Last edited 9 years ago by martinl (previous) (diff)

comment:5 by neteler, 8 years ago

Milestone: 7.1.07.2.0

Milestone renamed

comment:6 by martinl, 8 years ago

In 69194:

v.overlay: added _1 to attribute table's name when working with v.overlay (see #2765)

comment:7 by martinl, 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 martinl, 8 years ago

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

comment:9 by martinl, 8 years ago

Resolution: fixed
Status: assignedclosed

In 69245:

v.overlay: added _1 to attribute table's name when working with v.overlay (fix #2765) (merge r69194 from trunk)

in reply to:  7 ; comment:10 by mmetz, 8 years ago

Replying to martinl:

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.

What are the results now with v.overlay olayer=0,1,2 and with with v.overlay olayer=1,2,3?

in reply to:  10 ; comment:11 by martinl, 8 years ago

Replying to mmetz:

What are the results now with v.overlay olayer=0,1,2 and with with v.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?

in reply to:  11 comment:12 by mmetz, 8 years ago

Replying to martinl:

Replying to mmetz:

What are the results now with v.overlay olayer=0,1,2 and with with v.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?

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.

Note: See TracTickets for help on using tickets.