def field_precisions(self): "Returns the field precisions for the features." return [ capi.get_field_precision(capi.get_field_defn(self._ldefn, i)) for i in xrange(self.num_fields) ]
def field_precisions(self): "Returns the field precisions for the features." return [capi.get_field_precision(capi.get_field_defn(self._ldefn, i)) for i in range(self.num_fields)]
def precision(self): "Return the precision of this Field." return capi.get_field_precision(self.ptr)
def precision(self): "Returns the precision of this Field." return capi.get_field_precision(self.ptr)
def precision(self): "Returns the precision of this Field." return get_field_precision(self._ptr)
<<<<<<< HEAD "Returns the name of this Field." ======= "Return the name of this Field." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 name = capi.get_field_name(self.ptr) return force_text(name, encoding=self._feat.encoding, strings_only=True) @property def precision(self): <<<<<<< HEAD "Returns the precision of this Field." ======= "Return the precision of this Field." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 return capi.get_field_precision(self.ptr) @property def type(self): <<<<<<< HEAD "Returns the OGR type of this Field." ======= "Return the OGR type of this Field." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 return capi.get_field_type(self.ptr) @property def type_name(self): "Return the OGR field type name for this Field." return capi.get_field_type_name(self.type)
<<<<<<< HEAD "Returns a list of the maximum field widths for the features." ======= "Return a list of the maximum field widths for the features." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 return [capi.get_field_width(capi.get_field_defn(self._ldefn, i)) for i in range(self.num_fields)] @property def field_precisions(self): <<<<<<< HEAD "Returns the field precisions for the features." ======= "Return the field precisions for the features." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 return [capi.get_field_precision(capi.get_field_defn(self._ldefn, i)) for i in range(self.num_fields)] def _get_spatial_filter(self): try: return OGRGeometry(geom_api.clone_geom(capi.get_spatial_filter(self.ptr))) except GDALException: return None def _set_spatial_filter(self, filter): if isinstance(filter, OGRGeometry): capi.set_spatial_filter(self.ptr, filter.ptr) elif isinstance(filter, (tuple, list)): if not len(filter) == 4: raise ValueError('Spatial filter list/tuple must have 4 elements.') # Map c_double onto params -- if a bad type is passed in it
from ctypes import byref, c_int
from ctypes import byref, c_double