Esempio n. 1
0
 def fields(self):
     """
     Returns a list of string names corresponding to each of the Fields
     available in this Layer.
     """
     return [get_field_name(get_field_defn(self._ldefn, i)) 
             for i in xrange(self.num_fields) ]
Esempio n. 2
0
 def fields(self):
     """
     Returns a list of string names corresponding to each of the Fields
     available in this Layer.
     """
     return [capi.get_field_name(capi.get_field_defn(self._ldefn, i)) 
             for i in xrange(self.num_fields) ]
Esempio n. 3
0
 def fields(self):
     """
     Returns a list of string names corresponding to each of the Fields
     available in this Layer.
     """
     return [force_text(capi.get_field_name(capi.get_field_defn(self._ldefn, i)),
                        self._ds.encoding, strings_only=True)
             for i in range(self.num_fields)]
Esempio n. 4
0
File: layer.py Progetto: 01-/django
 def fields(self):
     """
     Returns a list of string names corresponding to each of the Fields
     available in this Layer.
     """
     return [force_text(capi.get_field_name(capi.get_field_defn(self._ldefn, i)),
                        self._ds.encoding, strings_only=True)
             for i in range(self.num_fields)]
Esempio n. 5
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. 6
0
 def fields(self):
     "Return a list of fields in the Feature."
     return [
         force_text(capi.get_field_name(
             capi.get_field_defn(self._layer._ldefn, i)),
                    self.encoding,
                    strings_only=True) for i in range(self.num_fields)
     ]
Esempio n. 7
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. 8
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. 9
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. 10
0
 def fields(self):
     "Return a list of fields in the Feature."
     return [
         force_text(
             capi.get_field_name(capi.get_field_defn(self._layer._ldefn, i)),
             self.encoding,
             strings_only=True
         ) for i in range(self.num_fields)
     ]
Esempio n. 11
0
    def fields(self):
        """
<<<<<<< HEAD
        Returns a list of string names corresponding to each of the Fields
=======
        Return a list of string names corresponding to each of the Fields
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        available in this Layer.
        """
        return [force_text(capi.get_field_name(capi.get_field_defn(self._ldefn, i)),
                           self._ds.encoding, strings_only=True)
                for i in range(self.num_fields)]
Esempio n. 12
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. 13
0
 def fields(self):
     "Returns a list of fields in the Feature."
     return [
         get_field_name(get_field_defn(self._fdefn, i))
         for i in xrange(self.num_fields)
     ]
Esempio n. 14
0
        return force_text(name, self.encoding, strings_only=True)

    @property
    def num_fields(self):
<<<<<<< HEAD
        "Returns the number of fields in the Feature."
=======
        "Return the number of fields in the Feature."
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        return capi.get_feat_field_count(self.ptr)

    @property
    def fields(self):
<<<<<<< HEAD
        "Returns a list of fields in the Feature."
        return [capi.get_field_name(capi.get_field_defn(self._layer._ldefn, i))
                for i in range(self.num_fields)]

    @property
    def geom(self):
        "Returns the OGR Geometry for this Feature."
=======
        "Return a list of fields in the Feature."
        return [
            force_text(
                capi.get_field_name(capi.get_field_defn(self._layer._ldefn, i)),
                self.encoding,
                strings_only=True
            ) for i in range(self.num_fields)
        ]
Esempio n. 15
0
 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)
     ]
Esempio n. 16
0
 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)
     ]
Esempio n. 17
0
 def fields(self):
     "Returns a list of fields in the Feature."
     return [get_field_name(get_field_defn(self._fdefn, i)) 
             for i in xrange(self.num_fields)]
Esempio n. 18
0
 def fields(self):
     "Returns a list of fields in the Feature."
     return [
         capi.get_field_name(capi.get_field_defn(self._layer._ldefn, i))
         for i in range(self.num_fields)
     ]
Esempio n. 19
0
from django.contrib.gis.gdal.base import GDALBase
Esempio n. 20
0
 def fields(self):
     "Returns a list of fields in the Feature."
     return [capi.get_field_name(capi.get_field_defn(self._layer._ldefn, i))
             for i in xrange(self.num_fields)]
Esempio n. 21
0
        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)))
Esempio n. 22
0
File: layer.py Progetto: 01-/django
 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)]
Esempio n. 23
0
File: layer.py Progetto: 01-/django
 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)]
Esempio n. 24
0
from ctypes import byref, c_double