Exemplo n.º 1
0
Arquivo: layer.py Projeto: 01-/django
 def srs(self):
     "Returns the Spatial Reference used in this Layer."
     try:
         ptr = capi.get_layer_srs(self.ptr)
         return SpatialReference(srs_api.clone_srs(ptr))
     except SRSException:
         return None
Exemplo n.º 2
0
 def srs(self):
     "Returns the Spatial Reference used in this Layer."
     try:
         ptr = capi.get_layer_srs(self.ptr)
         return SpatialReference(srs_api.clone_srs(ptr))
     except SRSException:
         return None
Exemplo n.º 3
0
<<<<<<< HEAD
        "Returns the geometry type (OGRGeomType) of the Layer."
=======
        "Return the geometry type (OGRGeomType) of the Layer."
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        return OGRGeomType(capi.get_fd_geom_type(self._ldefn))

    @property
    def srs(self):
<<<<<<< HEAD
        "Returns the Spatial Reference used in this Layer."
=======
        "Return the Spatial Reference used in this Layer."
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        try:
            ptr = capi.get_layer_srs(self.ptr)
            return SpatialReference(srs_api.clone_srs(ptr))
        except SRSException:
            return None

    @property
    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)),
Exemplo n.º 4
0
from ctypes import byref, c_double