Class JtsWKTReaderShapeParser
- java.lang.Object
-
- org.locationtech.spatial4j.io.WKTReader
-
- org.locationtech.spatial4j.io.jts.JtsWKTReaderShapeParser
-
- All Implemented Interfaces:
ShapeIO,ShapeReader
@Deprecated public class JtsWKTReaderShapeParser extends WKTReader
Deprecated.This is an extension of Spatial4j'sWKTReaderthat processes the entire string with JTS'sWKTReader. Some differences:- No support for ENVELOPE and BUFFER
- MULTI* shapes use JTS's
GeometryCollectionsubclasses, notShapeCollection - 'Z' coordinates are saved into the geometry
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.locationtech.spatial4j.io.WKTReader
WKTReader.State
-
-
Constructor Summary
Constructors Constructor Description JtsWKTReaderShapeParser(JtsSpatialContext ctx, JtsSpatialContextFactory factory)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcheckCoordinates(org.locationtech.jts.geom.Geometry geom)Deprecated.private JtsShapeFactorygetShapeFactory()Deprecated.ShapeparseIfSupported(java.lang.String wktString)Deprecated.Parses the wktString, returning the defined Shape.protected ShapeparseIfSupported(java.lang.String str, org.locationtech.jts.io.WKTReader reader)Deprecated.Reads WKT from thestrvia JTS'sWKTReader.-
Methods inherited from class org.locationtech.spatial4j.io.WKTReader
getFormatName, newState, parse, parseBufferShape, parseEnvelopeShape, parseGeometryCollectionShape, parseLineStringShape, parseMulitPolygonShape, parseMultiLineStringShape, parseMultiPointShape, parsePointShape, parsePolygonShape, parseShapeByType, point, pointList, polygon, read, read, readIfSupported, shape
-
-
-
-
Constructor Detail
-
JtsWKTReaderShapeParser
public JtsWKTReaderShapeParser(JtsSpatialContext ctx, JtsSpatialContextFactory factory)
Deprecated.
-
-
Method Detail
-
parseIfSupported
public Shape parseIfSupported(java.lang.String wktString) throws java.text.ParseException
Deprecated.Description copied from class:WKTReaderParses the wktString, returning the defined Shape. If it can't because the shape name is unknown or an empty or blank string was passed, then it returns null. If the WKT starts with a supported shape but contains an inner unsupported shape then it will result in aParseException.- Overrides:
parseIfSupportedin classWKTReader- Parameters:
wktString- non-null, can be empty or have surrounding whitespace- Returns:
- Shape, null if unknown / unsupported shape.
- Throws:
java.text.ParseException- Thrown if there is an error in the Shape definition
-
getShapeFactory
private JtsShapeFactory getShapeFactory()
Deprecated.
-
parseIfSupported
protected Shape parseIfSupported(java.lang.String str, org.locationtech.jts.io.WKTReader reader) throws java.text.ParseException
Deprecated.Reads WKT from thestrvia JTS'sWKTReader.- Parameters:
reader-new WKTReader(ctx.getGeometryFactory()))
- Returns:
- Non-Null
- Throws:
java.text.ParseException
-
checkCoordinates
protected void checkCoordinates(org.locationtech.jts.geom.Geometry geom)
Deprecated.
-
-