示例#1
0
 def _get_spatial_filter(self):
     try:
         return OGRGeometry(
             geom_api.clone_geom(capi.get_spatial_filter(self.ptr)))
     except OGRException:
         return None
示例#2
0
 def geom(self):
     "Return 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))
示例#3
0
        "Return a list of fields in the Feature."
        return [
            force_text(
                capi.get_field_name(capi.get_field_defn(self._layer._ldefn, i)),
                self.encoding,
                strings_only=True
            ) for i in range(self.num_fields)
        ]

    @property
    def geom(self):
        "Return the OGR Geometry for this Feature."
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        # Retrieving the geometry pointer for the feature.
        geom_ptr = capi.get_feat_geom_ref(self.ptr)
        return OGRGeometry(geom_api.clone_geom(geom_ptr))

    @property
    def geom_type(self):
<<<<<<< HEAD
        "Returns the OGR Geometry Type for this Feture."
=======
        "Return the OGR Geometry Type for this Feture."
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        return OGRGeomType(capi.get_fd_geom_type(self._layer._ldefn))

    # #### Feature Methods ####
    def get(self, field):
        """
<<<<<<< HEAD
        Returns the value of the field, instead of an instance of the Field