[gdal-dev] StringList and Esri Shapefile

Martin Landa landa.martin at gmail.com
Tue Oct 14 01:53:59 PDT 2014


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


More information about the gdal-dev mailing list