def __setstate__(self, state): """WKB doesn't differentiate between LineString and LinearRing so we need to move the coordinate sequence into the correct geometry type""" super(LinearRing, self).__setstate__(state) cs = lgeos.GEOSGeom_getCoordSeq(self.__geom__) cs_clone = lgeos.GEOSCoordSeq_clone(cs) lgeos.GEOSGeom_destroy(self.__geom__) self.__geom__ = lgeos.GEOSGeom_createLinearRing(cs_clone)
def empty(self, val=EMPTY): if not self._is_empty and self.__geom__: lgeos.GEOSGeom_destroy(self.__geom__) self.__geom__ = val
def empty(self): if not (self._owned or self._is_empty): from shapely.geos import lgeos lgeos.GEOSGeom_destroy(self.__geom__) self.__geom__ = EMPTY
def empty(self): if not self._is_empty: lgeos.GEOSGeom_destroy(self.__geom__) self.__geom__ = EMPTY