I have a layer of 15 polygons from a shapefile.  I can access the features
using Layer.GetFeature(i),
but not using Layer.GetNextFeature().

For example:
>>> polyFeature = pondsLayer.GetFeature(0)
>>> print polyFeature.GetFID()
0
>>> polyFeature = pondsLayer.GetFeature(1)
>>> print polyFeature.GetFID()
1

>>> polyFeature = pondsLayer.GetFeature(0)
>>> print polyFeature.GetFID()
0
>>> polyFeature = pondsLayer.GetNextFeature()
>>> print polyFeature.GetFID()
Traceback (most recent call last):
  File "<pyshell#23>", line 1, in <module>
    print polyFeature.GetFID()
AttributeError: 'NoneType' object has no attribute 'GetFID'

Any suggestions?

Thanks.

Dave Verbyla
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to