Class WKTReader

java.lang.Object
org.apache.sedona.common.S2Geography.WKTReader

public class WKTReader extends Object
  • Constructor Details

    • WKTReader

      public WKTReader()
    • WKTReader

      public WKTReader(org.locationtech.jts.geom.GeometryFactory geometryFactory)
  • Method Details

    • setIsOldJtsCoordinateSyntaxAllowed

      public void setIsOldJtsCoordinateSyntaxAllowed(boolean value)
      Sets a flag indicating, that coordinates may have 3 ordinate values even though no Z or M ordinate indicator is present. The default value is ALLOW_OLD_JTS_COORDINATE_SYNTAX.
      Parameters:
      value - a boolean value
    • setIsOldJtsMultiPointSyntaxAllowed

      public void setIsOldJtsMultiPointSyntaxAllowed(boolean value)
      Sets a flag indicating, that point coordinates in a MultiPoint geometry must not be enclosed in paren. The default value is ALLOW_OLD_JTS_MULTIPOINT_SYNTAX
      Parameters:
      value - a boolean value
    • setFixStructure

      public void setFixStructure(boolean isFixStructure)
      Sets a flag indicating that the structure of input geometry should be fixed so that the geometry can be constructed without error. This involves adding coordinates if the input coordinate sequence is shorter than required.
      Parameters:
      isFixStructure - true if the input structure should be fixed
      See Also:
      • LinearRing.MINIMUM_VALID_SIZE
    • read

      public Geography read(String wellKnownText) throws org.locationtech.jts.io.ParseException
      Reads a Well-Known Text representation of a Geometry from a String.
      Parameters:
      wellKnownText - one or more <Geometry Tagged Text> strings (see the OpenGIS Simple Features Specification) separated by whitespace
      Returns:
      a Geometry specified by wellKnownText
      Throws:
      org.locationtech.jts.io.ParseException - if a parsing problem occurs
    • read

      public Geography read(Reader reader) throws org.locationtech.jts.io.ParseException
      Reads a Well-Known Text representation of a Geography from a Reader.
      Parameters:
      reader - a Reader which will return a <Geometry Tagged Text> string (see the OpenGIS Simple Features Specification)
      Returns:
      a Geometry read from reader
      Throws:
      org.locationtech.jts.io.ParseException - if a parsing problem occurs