def field_types(self): """ 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. """ return [OGRFieldTypes[capi.get_field_type(capi.get_field_defn(self._ldefn, i))] for i in range(self.num_fields)]
def field_types(self): """ Returns a list of the types of fields in this Layer. For example, the list [OFTInteger, OFTReal, OFTString] would be returned for an OGR layer that had an integer, a floating-point, and string fields. """ return [FIELD_CLASSES[get_field_type(get_field_defn(self._ldefn, i))] for i in xrange(self.num_fields)]
def field_types(self): """ <<<<<<< HEAD Returns a list of the types of fields in this Layer. For example, the list [OFTInteger, OFTReal, OFTString] would be returned for an OGR layer that had an integer, a floating-point, and string fields. ======= 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)]
def type(self): "Returns the OGR type of this Field." return capi.get_field_type(self.ptr)
def type(self): "Return the OGR type of this Field." return capi.get_field_type(self.ptr)
def type(self): "Returns the OGR type of this Field." return get_field_type(self._ptr)
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) @property def value(self): <<<<<<< 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()
from ctypes import byref, c_int
from ctypes import byref, c_double