[GRASS-dev] [GRASS GIS] #3488: v.in.ogr mangeling of column names when imporing OSM geojson extracts

#3488: v.in.ogr mangeling of column names when imporing OSM geojson extracts
----------------------+---------------------------------
Reporter: alice | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.4.1
Component: Vector | Version: svn-releasebranch74
Keywords: v.in.ogr | CPU: All
Platform: Linux |
----------------------+---------------------------------
I tried to import geojson extracts from http://overpass-turbo.eu/ with the
query `highway=* and type:way` for the area of Bonn. When importing it
with v.in.ogr appeared:

{{{
Error in sqlite3_prepare():
duplicate column name: sloped_curb_end
}}}

This happens whenever changing the column names from name:name to
name_name, and whenever name_name is already existing in the dataset, it
stops and gives an error.

It would be nice to find a different solution while changing : of the
initial column names, maybe with whenever changing a : into _ adding a 1
at the end of the new name in order to prevent the creation of duplicates.

Geojson file attached.

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

#3488: v.in.ogr mangeling of column names when imporing OSM geojson extracts
---------------------+---------------------------------
  Reporter: alice | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.1
Component: Vector | Version: svn-releasebranch74
Resolution: | Keywords: v.in.ogr
       CPU: All | Platform: Linux
---------------------+---------------------------------
Changes (by alice):

* Attachment "bonn_streets_OSM _EPSG4326.zip" added.

Geojson sample data to reproduce error

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

#3488: v.in.ogr mangeling of column names when imporing OSM geojson extracts
---------------------+---------------------------------
  Reporter: alice | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.4.1
Component: Vector | Version: svn-releasebranch74
Resolution: fixed | Keywords: v.in.ogr
       CPU: All | Platform: Linux
---------------------+---------------------------------
Changes (by mmetz):

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

Comment:

In [changeset:"72209" 72209]:
{{{
#!CommitTicketReference repository="" revision="72209"
v.in.ogr: fix duplicate column names (fixes #3488)
}}}

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

#3488: v.in.ogr mangeling of column names when imporing OSM geojson extracts
---------------------+---------------------------------
  Reporter: alice | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 7.4.1
Component: Vector | Version: svn-releasebranch74
Resolution: | Keywords: v.in.ogr
       CPU: All | Platform: Linux
---------------------+---------------------------------
Changes (by mmetz):

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

Comment:

Replying to [comment:1 mmetz]:
> In [changeset:"72209" 72209]:
> {{{
> #!CommitTicketReference repository="" revision="72209"
> v.in.ogr: fix duplicate column names (fixes #3488)
> }}}

Re-opening because it is not yet fixed in relbr74

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

#3488: v.in.ogr mangeling of column names when imporing OSM geojson extracts
---------------------+---------------------------------
  Reporter: alice | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.4.1
Component: Vector | Version: svn-releasebranch74
Resolution: fixed | Keywords: v.in.ogr
       CPU: All | Platform: Linux
---------------------+---------------------------------
Changes (by neteler):

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

Comment:

In [changeset:"72215" 72215]:
{{{
#!CommitTicketReference repository="" revision="72215"
v.in.ogr: fix duplicate column names (trunk, r72209; fixes #3488)
}}}

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

#3488: v.in.ogr mangeling of column names when imporing OSM geojson extracts
---------------------+---------------------------------
  Reporter: alice | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.4.1
Component: Vector | Version: svn-releasebranch74
Resolution: fixed | Keywords: v.in.ogr
       CPU: All | Platform: Linux
---------------------+---------------------------------

Comment (by mmetz):

Replying to [comment:3 neteler]:
> In [changeset:"72215" 72215]:
> {{{
> #!CommitTicketReference repository="" revision="72215"
> v.in.ogr: fix duplicate column names (trunk, r72209; fixes #3488)
> }}}

Is it working for you now?

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

#3488: v.in.ogr mangeling of column names when imporing OSM geojson extracts
---------------------+---------------------------------
  Reporter: alice | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.4.1
Component: Vector | Version: svn-releasebranch74
Resolution: fixed | Keywords: v.in.ogr
       CPU: All | Platform: Linux
---------------------+---------------------------------

Comment (by alice):

Perfect, it is working now! Thank you!

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