Пример #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) ]
Пример #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) ]
Пример #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)]
Пример #4
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)]
Пример #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)]
Пример #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)
     ]
Пример #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)]
Пример #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)]
Пример #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)]
Пример #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)
     ]
Пример #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)]
Пример #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)]
Пример #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)
     ]
Пример #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)
        ]
Пример #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)
     ]
Пример #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)
     ]
Пример #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)]
Пример #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)
     ]
Пример #19
0
from django.contrib.gis.gdal.base import GDALBase
Пример #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)]
Пример #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)))
Пример #22
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 range(self.num_fields)]
Пример #23
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 range(self.num_fields)]
Пример #24
0
from ctypes import byref, c_double