public class JtsWKTReaderShapeParser extends JtsWktShapeParser
JtsWktShapeParser
that processes the entire
string with JTS's WKTReader
. Some differences:
GeometryCollection
subclasses,
not ShapeCollection
JtsWktShapeParser.DatelineRule, JtsWktShapeParser.ValidationRule
WktShapeParser.State
autoIndex, ctx, datelineRule, validationRule
Constructor and Description |
---|
JtsWKTReaderShapeParser(JtsSpatialContext ctx,
JtsSpatialContextFactory factory) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkCoordinates(com.vividsolutions.jts.geom.Geometry geom) |
Shape |
parseIfSupported(String wktString)
Parses the wktString, returning the defined Shape.
|
protected Shape |
parseIfSupported(String str,
com.vividsolutions.jts.io.WKTReader reader)
Reads WKT from the
str via JTS's WKTReader . |
coordinate, coordinateSequence, coordinateSequenceList, getDatelineRule, getValidationRule, isAutoIndex, isAutoValidate, makeRectFromPoly, makeShapeFromGeometry, normDist, parseLineStringShape, parseMulitPolygonShape, parsePolygonShape, parseShapeByType, polygon
getCtx, newState, parse, parseBufferShape, parseEnvelopeShape, parseGeometryCollectionShape, parseMultiLineStringShape, parseMultiPointShape, parsePointShape, point, pointList, shape
public JtsWKTReaderShapeParser(JtsSpatialContext ctx, JtsSpatialContextFactory factory)
public Shape parseIfSupported(String wktString) throws ParseException
WktShapeParser
ParseException
.parseIfSupported
in class WktShapeParser
wktString
- non-null, can be empty or have surrounding whitespaceParseException
- Thrown if there is an error in the Shape definitionprotected Shape parseIfSupported(String str, com.vividsolutions.jts.io.WKTReader reader) throws ParseException
str
via JTS's WKTReader
.str
- reader
- new WKTReader(ctx.getGeometryFactory()))
ParseException
protected void checkCoordinates(com.vividsolutions.jts.geom.Geometry geom)
Copyright © 2015 LocationTech. All rights reserved.