コード例 #1
0
ファイル: feature.py プロジェクト: timothyclemans/djangocg
 def geom(self):
     "Returns the OGR Geometry for this Feature."
     # Retrieving the geometry pointer for the feature.
     geom_ptr = capi.get_feat_geom_ref(self.ptr)
     return OGRGeometry(geom_api.clone_geom(geom_ptr))
コード例 #2
0
ファイル: layer.py プロジェクト: timothyclemans/djangocg
 def _get_spatial_filter(self):
     try:
         return OGRGeometry(geom_api.clone_geom(capi.get_spatial_filter(self.ptr)))
     except OGRException:
         return None