[GRASS-dev] [GRASS GIS] #2962: v.out.ogr should be able to shrink attributes names for ESRI Shapefile format

#2962: v.out.ogr should be able to shrink attributes names for ESRI Shapefile
format
----------------------------+-------------------------
Reporter: medspx | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: Default | Version: unspecified
Keywords: ogr, shapefile | CPU: All
Platform: All |
----------------------------+-------------------------
When trying to use v.out.ogr to shapefiles, some attributes are not
exported at all just because their name is more than 10 characters long.

v.out.ogr complains: ERROR 6: Failed to add field named 'a_road_name'

I know this is a Shapefile limit but I think that there should be a
mechanism like in OGR library where unique field names are produced:

"Attribute names can only be up to 10 characters long. Starting with
version 1.7, the OGR Shapefile driver tries to generate unique field
names. Successive duplicate field names, including those created by
truncation to 10 characters, will be truncated to 8 characters and
appended with a serial number from 1 to 99.

For example:

     a → a, a → a_1, A → A_2;
     abcdefghijk → abcdefghij, abcdefghijkl → abcdefgh_1"

With such a mechanism there would be less export errors...

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

#2962: v.out.ogr should be able to shrink attributes names for ESRI Shapefile
format
---------------------+--------------------------------------
  Reporter: medspx | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.4
Component: Vector | Version: unspecified
Resolution: | Keywords: v.in.ogr, ogr, shapefile
       CPU: All | Platform: All
---------------------+--------------------------------------
Changes (by martinl):

* keywords: ogr, shapefile => v.in.ogr, ogr, shapefile
* component: Default => Vector

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

#2962: v.out.ogr should be able to shrink attributes names for ESRI Shapefile
format
---------------------+--------------------------------------
  Reporter: medspx | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.6.2
Component: Vector | Version: unspecified
Resolution: | Keywords: v.in.ogr, ogr, shapefile
       CPU: All | Platform: All
---------------------+--------------------------------------
Changes (by martinl):

* milestone: 7.0.7 => 7.6.2

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