def extent(self): "Returns the extent (an Envelope) of this layer." env = OGREnvelope() capi.get_extent(self.ptr, byref(env), 1) return Envelope(env)
raise OGRIndexError('Invalid feature id: %s.' % feat_id) ======= # Should have returned a Feature, raise an IndexError. raise IndexError('Invalid feature id: %s.' % feat_id) >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 # #### Layer properties #### @property def extent(self): <<<<<<< HEAD "Returns the extent (an Envelope) of this layer." ======= "Return the extent (an Envelope) of this layer." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 env = OGREnvelope() capi.get_extent(self.ptr, byref(env), 1) return Envelope(env) @property def name(self): <<<<<<< HEAD "Returns the name of this layer in the Data Source." ======= "Return the name of this layer in the Data Source." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 name = capi.get_fd_name(self._ldefn) return force_text(name, self._ds.encoding, strings_only=True) @property def num_feat(self, force=1): <<<<<<< HEAD
def extent(self): "Returns the extent (an Envelope) of this layer." env = OGREnvelope() capi.get_extent(self.ptr, byref(env), 1) return Envelope(env)
from ctypes import byref, c_double