def test_wkb_to_wkt(self): poly_geojson = self.generate_rect_geojson([1,-1,2,-2]) poly_shape = gis_util.geojson_to_shape(poly_geojson) poly_wkb = gis_util.shape_to_wkb(poly_shape) poly_wkt = gis_util.wkb_to_wkt(poly_wkb)
def sa_wkb_to_wkt(sa_wkb): """ Convert SA Geometry proxy objects to wkt. """ return gis_util.wkb_to_wkt(str(sa_wkb.geom_wkb))