Opened 4 years ago

Closed 3 years ago

Last modified 3 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 Changed 4 years ago by lfurtkevicova

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 Changed 4 years ago by lfurtkevicova

Keywords: database v.overlay added

comment:3 Changed 4 years ago by annakrat

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

comment:4 Changed 4 years ago by martinl

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 4 years ago by martinl (previous) (diff)

comment:5 Changed 4 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

comment:6 Changed 3 years ago by martinl

In 69194:

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

comment:7 Changed 3 years ago by 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.

comment:8 Changed 3 years ago by martinl

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

comment:9 Changed 3 years ago by martinl

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)

comment:10 in reply to:  7 ; Changed 3 years ago by mmetz

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?

comment:11 in reply to:  10 ; Changed 3 years ago by 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?

comment:12 in reply to:  11 Changed 3 years ago by mmetz

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.