def field_widths(self): "Returns a list of the maximum field widths for the features." return [capi.get_field_width(capi.get_field_defn(self._ldefn, i)) for i in range(self.num_fields)]
def width(self): "Returns the width of this Field." return capi.get_field_width(self.ptr)
def field_widths(self): "Returns a list of the maximum field widths for the features." return [ capi.get_field_width(capi.get_field_defn(self._ldefn, i)) for i in xrange(self.num_fields) ]
def width(self): "Returns the width of this Field." return get_field_width(self._ptr)
def width(self): "Return the width of this Field." return capi.get_field_width(self.ptr)
<<<<<<< HEAD "Returns the value of this Field." ======= "Return the value of this Field." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 # Default is to get the field as a string. return self.as_string() @property def width(self): <<<<<<< HEAD "Returns the width of this Field." ======= "Return the width of this Field." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 return capi.get_field_width(self.ptr) # ### The Field sub-classes for each OGR Field type. ### class OFTInteger(Field): _double = False _bit64 = False @property def value(self): <<<<<<< HEAD "Returns an integer contained in this field." ======= "Return an integer contained in this field." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 if self._double:
Return a list of the types of fields in this Layer. For example, return the list [OFTInteger, OFTReal, OFTString] for an OGR layer that has an integer, a floating-point, and string fields. >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 """ return [OGRFieldTypes[capi.get_field_type(capi.get_field_defn(self._ldefn, i))] for i in range(self.num_fields)] @property def field_widths(self): <<<<<<< 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)))
from ctypes import byref, c_int
from ctypes import byref, c_double