[gdal-dev] GetFeatures 1-indexed for spatialite?

Matt Perry perrygeo at gmail.com
Mon Feb 23 10:40:42 PST 2015


I'm running into some strange behavior with the Spatialite driver,
accessing features through the ogr python bindings.

    layer.GetFeature(0) == None
    layer.GetFeature(1) == ...   # first feature

for spatialite layers only; all other drivers appear to be 0-indexed.

More details and code to reproduce:
https://github.com/perrygeo/python-raster-stats/issues/55#issuecomment-75602253

I'm using GDAL 1.11.1 on OS X via homebrew and the latest python
bindings from pypi. Is this a bug or undocumented behavior?

Matt Perry


More information about the gdal-dev mailing list