MCPcopy
hub / github.com/django/django / test_capability

Method test_capability

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

Return a bool indicating whether the this Layer supports the given capability (a string). Valid capability strings include: 'RandomRead', 'SequentialWrite', 'RandomWrite', 'FastSpatialFilter', 'FastFeatureCount', 'FastGetExtent', 'CreateField', 'Transactions',

(self, capability)

Source from the content-addressed store, hash-verified

224 return [feat.geom for feat in self]
225
226 def test_capability(self, capability):
227 """
228 Return a bool indicating whether the this Layer supports the given
229 capability (a string). Valid capability strings include:
230 'RandomRead', 'SequentialWrite', 'RandomWrite', 'FastSpatialFilter',
231 'FastFeatureCount', 'FastGetExtent', 'CreateField', 'Transactions',
232 'DeleteFeature', and 'FastSetNextByIndex'.
233 """
234 return bool(capi.test_capability(self.ptr, force_bytes(capability)))

Callers 1

__init__Method · 0.95

Calls 1

force_bytesFunction · 0.90

Tested by

no test coverage detected