[gdal-dev] StringList and Esri Shapefile

Paul Meems bontepaarden at gmail.com
Tue Oct 14 02:22:20 PDT 2014


Hi Martin,

For ESRI shapefiles to max size of fieldnames is 10, so it is truncated.



Paul

*Paul Meems *
Release manager, configuration manager
and forum moderator of MapWindow GIS.
www.mapwindow.org

Owner of MapWindow.nl - Support for
Dutch speaking users.
www.mapwindow.nl



*The English presentations of the MapWindow GIS Conference 2014 are online.
<http://www.slideshare.net/mapwindow>*

2014-10-14 10:53 GMT+02:00 Martin Landa <landa.martin at gmail.com>:

> Hi,
>
> 2014-10-13 18:30 GMT+02:00 Martin Landa <landa.martin at gmail.com>:
>
> I have another problem with Esri Shapefile format probably not related
> to the originally reported issue. When converting data (GML)
>
> OGRFeature(Parcely):0
>   gml_id (String) = PA.2561191602
>   Id (String) = 2561191602
>   Nespravny (String) = (null)
>   KmenoveCislo (Integer) = 162
>   PododdeleniCisla (Integer) = 2
>
> to Esri Shapefile I get
>
> OGRFeature(parcely):0
>   gml_id (String) = PA.2561191602
>   Id (String) = 2561191602
>   Nespravny (String) = (null)
>   KmenoveCis (Integer) = (null)
>   Pododdelen (Integer) = (null)
>
> So missed 'KmenoveCislo/KmenoveCis'. Converting the same data using
> ogr2ogr works.
>
> But the same Python script works well when converting data eg. to PostGIS:
>
> OGRFeature(parcely):1
>   gml_id (String) = PA.2561191602
>   id (String) = 2561191602
>   nespravny (String) = (null)
>   kmenovecislo (Integer) = 162
>   pododdelenicisla (Integer) = 2
>
>
> Critical part of the code:
>
> """
> ofeature = ogr.Feature(olayer.GetLayerDefn())
> ofeature.SetFrom(feature)
> ...
> olayer.CreateFeature(ofeature)
> """
>
> Any idea what could be wrong? Thanks in advance! Martin
>
> --
> Martin Landa * http://geo.fsv.cvut.cz/gwiki/Landa
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20141014/d677b908/attachment.html>


More information about the gdal-dev mailing list