MCPcopy
hub / github.com/django/django / get_geoms

Method get_geoms

django/contrib/gis/gdal/layer.py:214–224  ·  view source on GitHub ↗

Return a list containing the OGRGeometry for every Feature in the Layer.

(self, geos=False)

Source from the content-addressed store, hash-verified

212 return [feat.get(field_name) for feat in self]
213
214 def get_geoms(self, geos=False):
215 """
216 Return a list containing the OGRGeometry for every Feature in
217 the Layer.
218 """
219 if geos:
220 from django.contrib.gis.geos import GEOSGeometry
221
222 return [GEOSGeometry(feat.geom.wkb) for feat in self]
223 else:
224 return [feat.geom for feat in self]
225
226 def test_capability(self, capability):
227 """

Callers

nothing calls this directly

Calls 1

GEOSGeometryClass · 0.90

Tested by

no test coverage detected