[GRASS-dev] [GRASS GIS] #2765: added "_1" to attribute table's name when working with v.overlay (OR )

#2765: added "_1" to attribute table's name when working with v.overlay (OR )
---------------------------+-------------------------
Reporter: lfurtkevicova | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Database | Version: 7.0.1
Keywords: | CPU: x86-64
Platform: Linux |
---------------------------+-------------------------
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 ...

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2765&gt;
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+-------------------------
  Reporter: lfurtkevicova | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Database | Version: 7.0.1
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
----------------------------+-------------------------

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2765#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+---------------------------------
  Reporter: lfurtkevicova | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Database | Version: 7.0.1
Resolution: | Keywords: database, v.overlay
       CPU: x86-64 | Platform: Linux
----------------------------+---------------------------------
Changes (by lfurtkevicova):

* keywords: => database, v.overlay

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2765#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+---------------------------------
  Reporter: lfurtkevicova | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Database | Version: 7.0.1
Resolution: | Keywords: database, v.overlay
       CPU: x86-64 | Platform: Linux
----------------------------+---------------------------------

Comment (by annakrat):

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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2765#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+---------------------------------
  Reporter: lfurtkevicova | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Database | Version: 7.0.1
Resolution: | Keywords: database, v.overlay
       CPU: x86-64 | Platform: Linux
----------------------------+---------------------------------

Comment (by martinl):

The `_1` 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
output without table postfix.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2765#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+---------------------------------
  Reporter: lfurtkevicova | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Database | Version: 7.0.1
Resolution: | Keywords: database, v.overlay
       CPU: x86-64 | Platform: Linux
----------------------------+---------------------------------

Comment (by martinl):

In [changeset:"69194" 69194]:
{{{
#!CommitTicketReference repository="" revision="69194"
v.overlay: added _1 to attribute table's name when working with v.overlay
(see #2765)
}}}

--
Ticket URL: </ticket/2765#comment:6>
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+---------------------------------
  Reporter: lfurtkevicova | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Database | Version: 7.0.1
Resolution: | Keywords: database, v.overlay
       CPU: x86-64 | Platform: Linux
----------------------------+---------------------------------

Comment (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.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2765#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+---------------------------------
  Reporter: lfurtkevicova | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.2.0
Component: Database | Version: 7.0.1
Resolution: | Keywords: database, v.overlay
       CPU: x86-64 | Platform: Linux
----------------------------+---------------------------------
Changes (by martinl):

* cc: grass-dev@… (added)
* status: new => assigned
* owner: grass-dev@… => martinl

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2765#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+---------------------------------
  Reporter: lfurtkevicova | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Database | Version: 7.0.1
Resolution: fixed | Keywords: database, v.overlay
       CPU: x86-64 | Platform: Linux
----------------------------+---------------------------------
Changes (by martinl):

* status: assigned => closed
* resolution: => fixed

Comment:

In [changeset:"69245" 69245]:
{{{
#!CommitTicketReference repository="" revision="69245"
v.overlay: added _1 to attribute table's name when working with v.overlay
(fix #2765) (merge r69194 from trunk)
}}}

--
Ticket URL: </ticket/2765#comment:9>
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+---------------------------------
  Reporter: lfurtkevicova | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Database | Version: 7.0.1
Resolution: fixed | Keywords: database, v.overlay
       CPU: x86-64 | Platform: Linux
----------------------------+---------------------------------

Comment (by mmetz):

Replying to [comment:7 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`?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2765#comment:10&gt;
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+---------------------------------
  Reporter: lfurtkevicova | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Database | Version: 7.0.1
Resolution: fixed | Keywords: database, v.overlay
       CPU: x86-64 | Platform: Linux
----------------------------+---------------------------------

Comment (by martinl):

Replying to [comment:10 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?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2765#comment:11&gt;
GRASS GIS <https://grass.osgeo.org>

#2765: added "_1" to attribute table's name when working with v.overlay
----------------------------+---------------------------------
  Reporter: lfurtkevicova | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Database | Version: 7.0.1
Resolution: fixed | Keywords: database, v.overlay
       CPU: x86-64 | Platform: Linux
----------------------------+---------------------------------

Comment (by mmetz):

Replying to [comment:11 martinl]:
> Replying to [comment:10 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.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2765#comment:12&gt;
GRASS GIS <https://grass.osgeo.org>