def wkb(self): "Returns the WKB representation of the Geometry." if sys.byteorder == 'little': byteorder = 1 # wkbNDR (from ogr_core.h) else: byteorder = 0 # wkbXDR sz = self.wkb_size # Creating the unsigned character buffer, and passing it in by reference. buf = (c_ubyte * sz)() capi.to_wkb(self.ptr, byteorder, byref(buf)) # Returning a buffer of the string at the pointer. return six.memoryview(string_at(buf, sz))
@property def wkb(self): <<<<<<< HEAD "Returns the WKB representation of the Geometry." ======= "Return the WKB representation of the Geometry." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 if sys.byteorder == 'little': byteorder = 1 # wkbNDR (from ogr_core.h) else: byteorder = 0 # wkbXDR sz = self.wkb_size # Creating the unsigned character buffer, and passing it in by reference. buf = (c_ubyte * sz)() capi.to_wkb(self.ptr, byteorder, byref(buf)) # Returning a buffer of the string at the pointer. <<<<<<< HEAD return six.memoryview(string_at(buf, sz)) @property def wkt(self): "Returns the WKT representation of the Geometry." ======= return memoryview(string_at(buf, sz)) @property def wkt(self): "Return the WKT representation of the Geometry." >>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435 return capi.to_wkt(self.ptr, byref(c_char_p()))