Parses a string containing one of the supported formats and creates a geometry value of the appropriate type. This method
is used by the server when evaluating a cast from a binary string to a geometry type.
Some input formats contain a SRID definition. If provided, the srid parameter must match any value taken from the input string.