Exemplo n.º 1
0
 def __init__(self, layer_ptr):
     "Needs a C pointer (Python/ctypes integer) in order to initialize."
     self._ptr = None  # Initially NULL
     if not layer_ptr:
         raise OGRException('Cannot create Layer, invalid pointer given')
     self._ptr = layer_ptr
     self._ldefn = get_layer_defn(self._ptr)
Exemplo n.º 2
0
 def __init__(self, layer_ptr):
     "Needs a C pointer (Python/ctypes integer) in order to initialize."
     self._ptr = None # Initially NULL
     if not layer_ptr:
         raise OGRException('Cannot create Layer, invalid pointer given')
     self._ptr = layer_ptr
     self._ldefn = get_layer_defn(self._ptr)
Exemplo n.º 3
0
 def __init__(self, layer_ptr):
     "Needs a C pointer (Python/ctypes integer) in order to initialize."
     self._ptr = None # Initially NULL
     if not layer_ptr:
         raise OGRException('Cannot create Layer, invalid pointer given')
     self._ptr = layer_ptr
     self._ldefn = get_layer_defn(self._ptr)
     # Does the Layer support random reading?
     self._random_read = self.test_capability('RandomRead')
Exemplo n.º 4
0
Arquivo: layer.py Projeto: 01-/django
 def __init__(self, layer_ptr, ds):
     """
     Initializes on an OGR C pointer to the Layer and the `DataSource` object
     that owns this layer.  The `DataSource` object is required so that a
     reference to it is kept with this Layer.  This prevents garbage
     collection of the `DataSource` while this Layer is still active.
     """
     if not layer_ptr:
         raise GDALException('Cannot create Layer, invalid pointer given')
     self.ptr = layer_ptr
     self._ds = ds
     self._ldefn = capi.get_layer_defn(self._ptr)
     # Does the Layer support random reading?
     self._random_read = self.test_capability(b'RandomRead')
Exemplo n.º 5
0
 def __init__(self, layer_ptr, ds):
     """
     Initializes on an OGR C pointer to the Layer and the `DataSource` object
     that owns this layer.  The `DataSource` object is required so that a
     reference to it is kept with this Layer.  This prevents garbage
     collection of the `DataSource` while this Layer is still active.
     """
     if not layer_ptr:
         raise OGRException('Cannot create Layer, invalid pointer given')
     self.ptr = layer_ptr
     self._ds = ds
     self._ldefn = capi.get_layer_defn(self._ptr)
     # Does the Layer support random reading?
     self._random_read = self.test_capability(b'RandomRead')
Exemplo n.º 6
0
from ctypes import byref, c_double