Esempio n. 1
0
 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)]
Esempio n. 2
0
 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)]
Esempio n. 3
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 [FIELD_CLASSES[get_field_type(get_field_defn(self._ldefn, i))]
             for i in xrange(self.num_fields)]
Esempio n. 4
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 [FIELD_CLASSES[get_field_type(get_field_defn(self._ldefn, i))]
             for i in xrange(self.num_fields)]
Esempio n. 5
0
    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)]
Esempio n. 6
0
 def type(self):
     "Returns the OGR type of this Field."
     return capi.get_field_type(self.ptr)
Esempio n. 7
0
 def type(self):
     "Return the OGR type of this Field."
     return capi.get_field_type(self.ptr)
Esempio n. 8
0
 def type(self):
     "Returns the OGR type of this Field."
     return get_field_type(self._ptr)
Esempio n. 9
0
 def type(self):
     "Returns the OGR type of this Field."
     return get_field_type(self._ptr)
Esempio n. 10
0
    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()
Esempio n. 11
0
from ctypes import byref, c_int
Esempio n. 12
0
from ctypes import byref, c_double