'The base constructor for GEOS geometry objects, and may take the
following inputs:
* strings:
- WKT
- HEXEWKB (a PostGIS-specific canonical form)
- GeoJSON (requires GDAL)
* buffer:
- WKB
The `srid` keyword is used to specify the Source Reference Identifier
(SRID) number for this Geometry.  If not set, the SRID will be None.'

def __init__(self, geo_input, srid=None):

    if isinstance(geo_input, bytes):
        geo_input = force_text(geo_input)
    if isinstance(geo_input, six.string_types):
        wkt_m = wkt_regex.match(geo_input)
        if wkt_m:
            if wkt_m.group(u'srid'):
                srid = int(wkt_m.group(u'srid'))
            g = wkt_r().read(force_bytes(wkt_m.group(u'wkt')))
        elif hex_regex.match(geo_input):
            g = wkb_r().read(force_bytes(geo_input))
        elif (gdal.HAS_GDAL and json_regex.match(geo_input)):
            g = wkb_r().read(gdal.OGRGeometry(geo_input).wkb)
        else:
            raise ValueError(u'String    or    unicode    input    unrecognized    as    WKT    EWKT,    and    HEXEWKB.')
    elif isinstance(geo_input, GEOM_PTR):
        g = geo_input
    elif isinstance(geo_input, memoryview):
        g = wkb_r().read(geo_input)
    elif isinstance(geo_input, GEOSGeometry):
        g = capi.geom_clone(geo_input.ptr)
    else:
        raise TypeError((u'Improper    geometry    input    type:    %s' % str(type(geo_input))))
    if bool(g):
        self.ptr = g
    else:
        raise GEOSException(u'Could    not    initialize    GEOS    Geometry    with    given    input.')
    self._post_init(srid)
