Package com.spatial4j.core.io.jts
Class JtsGeoJSONReader
- java.lang.Object
-
- com.spatial4j.core.io.GeoJSONReader
-
- com.spatial4j.core.io.jts.JtsGeoJSONReader
-
- All Implemented Interfaces:
ShapeIO,ShapeReader
public class JtsGeoJSONReader extends GeoJSONReader
-
-
Field Summary
Fields Modifier and Type Field Description protected JtsSpatialContextctx-
Fields inherited from class com.spatial4j.core.io.GeoJSONReader
BUFFER, BUFFER_UNITS
-
-
Constructor Summary
Constructors Constructor Description JtsGeoJSONReader(JtsSpatialContext ctx, SpatialContextFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.vividsolutions.jts.geom.Coordinatecoord(List list)protected com.vividsolutions.jts.geom.CoordinateSequencecoordseq(List list)protected com.vividsolutions.jts.geom.GeometryCollectioncreateGeometryCollection(com.vividsolutions.jts.geom.GeometryFactory gf, List geoms)protected com.vividsolutions.jts.geom.LineStringcreateLineString(com.vividsolutions.jts.geom.GeometryFactory gf, List list)protected com.vividsolutions.jts.geom.MultiLineStringcreateMultiLineString(com.vividsolutions.jts.geom.GeometryFactory gf, List list)protected com.vividsolutions.jts.geom.MultiPointcreateMultiPoint(com.vividsolutions.jts.geom.GeometryFactory gf, List list)protected com.vividsolutions.jts.geom.MultiPolygoncreateMultiPolygon(com.vividsolutions.jts.geom.GeometryFactory gf, List list)protected com.vividsolutions.jts.geom.PointcreatePoint(com.vividsolutions.jts.geom.GeometryFactory gf, List list)protected com.vividsolutions.jts.geom.PolygoncreatePolygon(com.vividsolutions.jts.geom.GeometryFactory gf, List list)protected ListensureSize(List list, int size)protected ShapemakeShapeFromCoords(String type, List coords)protected doublenumber(Object obj)com.vividsolutions.jts.geom.CoordinatereadCoord(org.noggit.JSONParser parser)List<com.vividsolutions.jts.geom.Coordinate>readCoordList(org.noggit.JSONParser parser)protected ShapereadPoint(org.noggit.JSONParser parser)protected ShapereadPolygon(org.noggit.JSONParser parser)This method takes a polygon and makes a bbox from it NOTE: not currently used! polygon is currently implemented in:GeoJSONReader.makeShapeFromCoords(String, List)We could add a 'strict' or 'leinent' mode that would try the best it can-
Methods inherited from class com.spatial4j.core.io.GeoJSONReader
getFormatName, read, read, readCircle, readCoordinates, readCoordListXY, readCoordXY, readDistance, readIfSupported, readLineString, readShape, readUntilEvent
-
-
-
-
Field Detail
-
ctx
protected final JtsSpatialContext ctx
-
-
Constructor Detail
-
JtsGeoJSONReader
public JtsGeoJSONReader(JtsSpatialContext ctx, SpatialContextFactory factory)
-
-
Method Detail
-
readCoord
public com.vividsolutions.jts.geom.Coordinate readCoord(org.noggit.JSONParser parser) throws IOException, ParseException- Throws:
IOExceptionParseException
-
readCoordList
public List<com.vividsolutions.jts.geom.Coordinate> readCoordList(org.noggit.JSONParser parser) throws IOException, ParseException
- Throws:
IOExceptionParseException
-
readPoint
protected Shape readPoint(org.noggit.JSONParser parser) throws IOException, ParseException
- Overrides:
readPointin classGeoJSONReader- Throws:
IOExceptionParseException
-
readPolygon
protected Shape readPolygon(org.noggit.JSONParser parser) throws IOException, ParseException
Description copied from class:GeoJSONReaderThis method takes a polygon and makes a bbox from it NOTE: not currently used! polygon is currently implemented in:GeoJSONReader.makeShapeFromCoords(String, List)We could add a 'strict' or 'leinent' mode that would try the best it can- Overrides:
readPolygonin classGeoJSONReader- Throws:
ParseExceptionIOException
-
makeShapeFromCoords
protected Shape makeShapeFromCoords(String type, List coords)
- Overrides:
makeShapeFromCoordsin classGeoJSONReader
-
createPoint
protected com.vividsolutions.jts.geom.Point createPoint(com.vividsolutions.jts.geom.GeometryFactory gf, List list)
-
createLineString
protected com.vividsolutions.jts.geom.LineString createLineString(com.vividsolutions.jts.geom.GeometryFactory gf, List list)
-
createPolygon
protected com.vividsolutions.jts.geom.Polygon createPolygon(com.vividsolutions.jts.geom.GeometryFactory gf, List list)
-
createMultiPoint
protected com.vividsolutions.jts.geom.MultiPoint createMultiPoint(com.vividsolutions.jts.geom.GeometryFactory gf, List list)
-
createMultiLineString
protected com.vividsolutions.jts.geom.MultiLineString createMultiLineString(com.vividsolutions.jts.geom.GeometryFactory gf, List list)
-
createMultiPolygon
protected com.vividsolutions.jts.geom.MultiPolygon createMultiPolygon(com.vividsolutions.jts.geom.GeometryFactory gf, List list)
-
createGeometryCollection
protected com.vividsolutions.jts.geom.GeometryCollection createGeometryCollection(com.vividsolutions.jts.geom.GeometryFactory gf, List geoms)
-
coord
protected com.vividsolutions.jts.geom.Coordinate coord(List list)
-
coordseq
protected com.vividsolutions.jts.geom.CoordinateSequence coordseq(List list)
-
number
protected double number(Object obj)
-
-