pygeoif
61d35639 - Add __iter__ method to FeatureCollection and GeometryCollection

Commit
9 years ago
Add __iter__ method to FeatureCollection and GeometryCollection Add the __iter__ method to allow looping over the contents of a FeatureCollection or Geometry collection. Also added some examples to the docs: >>> [geom for geom in geoms] [Point(1.0, -1.0), Point(1.0, -1.0)] >>> [feature for feature in c] [<Feature Instance Point geometry 2 properties>, <Feature Instance Point geometry 2 properties>] This allows you to loop over the Feature and Geometry objects contained in _features and _geoms without doing the following: [geom for geom in geoms._geoms]
Author
Committer
Parents
Loading