예제 #1
0
 def wkb_size(self):
     "Returns the size of the WKB buffer."
     return capi.get_wkbsize(self.ptr)
예제 #2
0
파일: geometries.py 프로젝트: 007lva/mmddpp
 def wkb_size(self):
     "Returns the size of the WKB buffer."
     return capi.get_wkbsize(self.ptr)
예제 #3
0
    def kml(self):
<<<<<<< HEAD
        "Returns the KML representation of the Geometry."
=======
        "Return the KML representation of the Geometry."
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        return capi.to_kml(self.ptr, None)

    @property
    def wkb_size(self):
<<<<<<< HEAD
        "Returns the size of the WKB buffer."
=======
        "Return the size of the WKB buffer."
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        return capi.get_wkbsize(self.ptr)

    @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)()