Interface WktDecoder


  • public interface WktDecoder
    A decoder for WKT (Well-Known Text) representations.

    In general WkbDecoder implementations are not be thread-safe.

    Author:
    Karel Maesen, Geovise BVBA
    • Method Detail

      • decode

        Geometry<?> decode​(String wkt)
        Decodes a WKT representation.
        Parameters:
        wkt - the WKT string to decode
        Returns:
        the decoded Geometry
        Throws:
        WktDecodeException - when the String is an invalid or unsupported WKT representation
      • decode

        <P extends PositionGeometry<P> decode​(String wkt,
                                                CoordinateReferenceSystem<P> crs)
        Decodes a WKT representation using the specified CoordinateReferenceSystem.

        If a (non-null) CoordinateReferenceSystem is provided, the SRID information in the WKT will be ignored.

        Type Parameters:
        P - the Position type for the returned Geometry
        Parameters:
        wkt - the WKT string to decode
        crs - the base coordinate reference system assumed for the wkt.
        Returns:
        the decoded Geometry
        Throws:
        WktDecodeException - when the String is an invalid or unsupported WKT representation, or the WKT is not consistent with the specified CoordinateReferenceSystem