[GRASS-dev] [GRASS GIS] #2584: Vectors skipping columns (character limit !!!) while exporting to OGR data

#2584: Vectors skipping columns (character limit !!!) while exporting to OGR data
----------------------------+-----------------------------------------------
Reporter: spareeth | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: LibVector | Version: svn-trunk
Keywords: OGR, shapefile | Platform: Linux
      Cpu: Unspecified |
----------------------------+-----------------------------------------------
Hi
I am trying to export a vector data with many columns to shape format. But
it seems it is avoiding all the columns with greater than 10 characters
(from the pattern, not sure). Tried in GRASS 6.4.5, GRASS 7.0 svn and
GRASS 7.1 svn, giving the same error.

Please find attached the packed vector layer which i tried.

{{{
v.out.ogr input=test output=test_output.shp
}}}
gives me following error, but finishes the job with remaining columns.

{{{
ERROR 6: Failed to add field named 'int_minimum'
ERROR 6: Failed to add field named 'int_maximum'
ERROR 6: Failed to add field named 'int_average'
ERROR 6: Failed to add field named 'int_variance'
ERROR 6: Failed to add field named 'int_coeff_var'
ERROR 6: Failed to add field named 'int_first_quartile'
ERROR 6: Failed to add field named 'int_third_quartile'
ERROR 6: Failed to add field named 'int_percentile_90'
}}}

Regards

Sajid

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

Sajid,
The shape file format has a 10 character limit on field name length. The smallest field name I see above is 11. see, http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Geoprocessing%20considerations%20for%20shapefile%20output

Doug

···

On Tue, Feb 10, 2015 at 12:13 PM, GRASS GIS <trac@osgeo.org> wrote:

#2584: Vectors skipping columns (character limit !!!) while exporting to OGR data
----------------------------±----------------------------------------------
Reporter: spareeth | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: LibVector | Version: svn-trunk
Keywords: OGR, shapefile | Platform: Linux
Cpu: Unspecified |
----------------------------±----------------------------------------------
Hi
I am trying to export a vector data with many columns to shape format. But
it seems it is avoiding all the columns with greater than 10 characters
(from the pattern, not sure). Tried in GRASS 6.4.5, GRASS 7.0 svn and
GRASS 7.1 svn, giving the same error.

Please find attached the packed vector layer which i tried.

{{{
v.out.ogr input=test output=test_output.shp
}}}
gives me following error, but finishes the job with remaining columns.

{{{
ERROR 6: Failed to add field named ‘int_minimum’
ERROR 6: Failed to add field named ‘int_maximum’
ERROR 6: Failed to add field named ‘int_average’
ERROR 6: Failed to add field named ‘int_variance’
ERROR 6: Failed to add field named ‘int_coeff_var’
ERROR 6: Failed to add field named ‘int_first_quartile’
ERROR 6: Failed to add field named ‘int_third_quartile’
ERROR 6: Failed to add field named ‘int_percentile_90’
}}}

Regards

Sajid


Ticket URL: <http://trac.osgeo.org/grass/ticket/2584>
GRASS GIS <http://grass.osgeo.org>


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newcomb@fws.gov

The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior. Life is too short for undocumented, proprietary data formats.

On 10 February 2015 at 18:58, Newcomb, Doug <doug_newcomb@fws.gov> wrote:

Sajid,

Hi Doug,

The shape file format has a 10 character limit on field name length. The
smallest field name I see above is 11. see,
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Geoprocessing%20considerations%20for%20shapefile%20output

Yes, but If I remember well v.out.ogr was cutting the field name
length more then 10. Am I wrong?
Otherwise we could add this feature..

Doug

--
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

On Wed, Feb 11, 2015 at 12:32 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:

On 10 February 2015 at 18:58, Newcomb, Doug <doug_newcomb@fws.gov> wrote:

The shape file format has a 10 character limit on field name length. The
smallest field name I see above is 11.

...

Yes, but If I remember well v.out.ogr was cutting the field name
length more then 10. Am I wrong?
Otherwise we could add this feature..

What do you mean, Luca?

We might use the new parser abbreviator here

E.g. 'int_percentile_90' --> 'ip90'

:slight_smile:

Markus

On Thu, Feb 12, 2015 at 6:58 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Wed, Feb 11, 2015 at 12:32 PM, Luca Delucchi <lucadeluge@gmail.com>
wrote:
> On 10 February 2015 at 18:58, Newcomb, Doug <doug_newcomb@fws.gov>
wrote:
>> The shape file format has a 10 character limit on field name length.
The
>> smallest field name I see above is 11.
...
> Yes, but If I remember well v.out.ogr was cutting the field name
> length more then 10. Am I wrong?

I also seem to remember that before v.out.ogr would export all columns,
even if they had field names of more than 10 characters. In those cases it
would simply use the first 10 characters as column name. Or am I confusing
this with other software I have used in the past? I think it would in any
case be better to export those fields with truncated field names than to
skip them.

> Otherwise we could add this feature..

What do you mean, Luca?

We might use the new parser abbreviator here

E.g. 'int_percentile_90' --> 'ip90'

:slight_smile:

Markus
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On 12 February 2015 at 18:58, Markus Neteler <neteler@osgeo.org> wrote:

On Wed, Feb 11, 2015 at 12:32 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:
...

Yes, but If I remember well v.out.ogr was cutting the field name
length more then 10. Am I wrong?
Otherwise we could add this feature..

What do you mean, Luca?

We might use the new parser abbreviator here

E.g. 'int_percentile_90' --> 'ip90'

no, but I remember something like 'int_percen'

:slight_smile:

:wink:

Markus

--
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

On 12 February 2015 at 20:20, Paulo van Breugel <p.vanbreugel@gmail.com> wrote:

I also seem to remember that before v.out.ogr would export all columns, even
if they had field names of more than 10 characters. In those cases it would
simply use the first 10 characters as column name. Or am I confusing this
with other software I have used in the past? I think it would in any case be
better to export those fields with truncated field names than to skip them.

ok, probably I'm not fully crazy :wink:

--
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org