module that holds classes for performing io operations on geos geometry objects specifically this has python implementations of wkbwkt reader and writer classes public classes for wkbwktreader which return geosgeometry public classes for wkb wkt reader which return geosgeometry
from django.contrib.gis.geos.geometry import GEOSGeometry
from django.contrib.gis.geos.prototypes.io import (
    WKBWriter,
    WKTWriter,
    _WKBReader,
    _WKTReader,
)

__all__ = ["WKBWriter", "WKTWriter", "WKBReader", "WKTReader"]



class WKBReader(_WKBReader):
    def read(self, wkb):
        "Return a GEOSGeometry for the given WKB buffer."
        return GEOSGeometry(super().read(wkb))


class WKTReader(_WKTReader):
    def read(self, wkt):
        "Return a GEOSGeometry for the given WKT string."
        return GEOSGeometry(super().read(wkt))