Class WKTReader
java.lang.Object
org.apache.sedona.common.S2Geography.WKTReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReads a Well-Known Text representation of aGeometryfrom aString.voidsetFixStructure(boolean isFixStructure) Sets a flag indicating that the structure of input geometry should be fixed so that the geometry can be constructed without error.voidsetIsOldJtsCoordinateSyntaxAllowed(boolean value) Sets a flag indicating, that coordinates may have 3 ordinate values even though no Z or M ordinate indicator is present.voidsetIsOldJtsMultiPointSyntaxAllowed(boolean value) Sets a flag indicating, that point coordinates in a MultiPoint geometry must not be enclosed in paren.
-
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 isALLOW_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 isALLOW_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
Reads a Well-Known Text representation of aGeometryfrom aString.- Parameters:
wellKnownText- one or more <Geometry Tagged Text> strings (see the OpenGIS Simple Features Specification) separated by whitespace- Returns:
- a
Geometryspecified bywellKnownText - Throws:
org.locationtech.jts.io.ParseException- if a parsing problem occurs
-
read
- Parameters:
reader- a Reader which will return a <Geometry Tagged Text> string (see the OpenGIS Simple Features Specification)- Returns:
- a
Geometryread fromreader - Throws:
org.locationtech.jts.io.ParseException- if a parsing problem occurs
-