Beispiel #1
0
 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 [OGRFieldTypes[capi.get_field_type(capi.get_field_defn(self._ldefn, i))]
             for i in xrange(self.num_fields)]
Beispiel #2
0
 def type(self):
     "Returns the OGR type of this Field."
     return capi.get_field_type(self.ptr)