Package | Description |
---|---|
com.spatial4j.core.context |
SpatialContext implementations are the facade to the Spatial4j API.
|
com.spatial4j.core.context.jts | |
com.spatial4j.core.io |
Reading & writing shapes in various forms.
|
com.spatial4j.core.io.jts | |
com.spatial4j.core.shape |
Shapes are the core geometry objects that Spatial4j provides.
|
com.spatial4j.core.shape.impl | |
com.spatial4j.core.shape.jts |
Modifier and Type | Method and Description |
---|---|
<S extends Shape> |
SpatialContext.makeCollection(List<S> coll)
Construct a ShapeCollection, analogous to an OGC GeometryCollection.
|
Modifier and Type | Method and Description |
---|---|
Shape |
SpatialContext.makeBufferedLineString(List<Point> points,
double buf)
Constructs a buffered line string.
|
Shape |
SpatialContext.makeLineString(List<Point> points)
Constructs a line string.
|
Shape |
SpatialContext.readShape(String value)
Deprecated.
|
Shape |
SpatialContext.readShapeFromWkt(String wkt)
Reads a shape from the string formatted in WKT.
|
Modifier and Type | Method and Description |
---|---|
String |
SpatialContext.toString(Shape shape)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Shape |
JtsSpatialContext.makeLineString(List<Point> points) |
Modifier and Type | Method and Description |
---|---|
com.vividsolutions.jts.geom.Geometry |
JtsSpatialContext.getGeometryFrom(Shape shape)
Gets a JTS
Geometry for the given Shape . |
String |
JtsSpatialContext.toString(Shape shape) |
Modifier and Type | Method and Description |
---|---|
Shape |
WktShapeParser.parse(String wktString)
Parses the wktString, returning the defined Shape.
|
protected Shape |
WktShapeParser.parseBufferShape(WktShapeParser.State state)
Parses the BUFFER operation applied to a parsed shape.
|
protected Shape |
WktShapeParser.parseEnvelopeShape(WktShapeParser.State state)
Parses an ENVELOPE (aka Rectangle) shape from the raw string.
|
protected Shape |
WktShapeParser.parseGeometryCollectionShape(WktShapeParser.State state)
Parses a GEOMETRYCOLLECTION shape from the raw string.
|
Shape |
WktShapeParser.parseIfSupported(String wktString)
Parses the wktString, returning the defined Shape.
|
protected Shape |
WktShapeParser.parseLineStringShape(WktShapeParser.State state)
Parses a LINESTRING shape from the raw string -- an ordered sequence of points.
|
protected Shape |
WktShapeParser.parseMultiLineStringShape(WktShapeParser.State state)
Parses a MULTILINESTRING shape from the raw string -- a collection of line strings.
|
protected Shape |
WktShapeParser.parseMultiPointShape(WktShapeParser.State state)
Parses a MULTIPOINT shape from the raw string -- a collection of points.
|
protected Shape |
WktShapeParser.parsePointShape(WktShapeParser.State state)
Parses a POINT shape from the raw string.
|
protected Shape |
WktShapeParser.parseShapeByType(WktShapeParser.State state,
String shapeType)
(internal) Parses the remainder of a shape definition following the shape's name
given as
shapeType already consumed via
WktShapeParser.State.nextWord() . |
Shape |
BinaryCodec.readShape(DataInput dataInput) |
protected Shape |
BinaryCodec.readShapeByTypeIfSupported(DataInput dataInput,
byte type) |
static Shape |
LegacyShapeReadWriterFormat.readShapeOrNull(String str,
SpatialContext ctx)
Deprecated.
Reads the shape specification as defined in the class javadocs.
|
protected Shape |
WktShapeParser.shape(WktShapeParser.State state)
Reads a shape from the current position, starting with the name of the shape.
|
Modifier and Type | Method and Description |
---|---|
protected byte |
BinaryCodec.typeForShape(Shape s) |
void |
BinaryCodec.writeShape(DataOutput dataOutput,
Shape s) |
static String |
LegacyShapeReadWriterFormat.writeShape(Shape shape)
Deprecated.
Writes a shape to a String, in a format that can be read by
LegacyShapeReadWriterFormat.readShapeOrNull(String, com.spatial4j.core.context.SpatialContext) . |
static String |
LegacyShapeReadWriterFormat.writeShape(Shape shape,
NumberFormat nf)
Deprecated.
Overloaded to provide a number format.
|
protected boolean |
BinaryCodec.writeShapeByTypeIfSupported(DataOutput dataOutput,
Shape s)
Note: writes the type byte even if not supported
|
protected boolean |
BinaryCodec.writeShapeByTypeIfSupported(DataOutput dataOutput,
Shape s,
byte type) |
Modifier and Type | Method and Description |
---|---|
Shape |
JtsWKTReaderShapeParser.parseIfSupported(String wktString) |
protected Shape |
JtsWKTReaderShapeParser.parseIfSupported(String str,
com.vividsolutions.jts.io.WKTReader reader)
Reads WKT from the
str via JTS's WKTReader . |
protected Shape |
JtsWktShapeParser.parseLineStringShape(WktShapeParser.State state)
Bypasses
JtsSpatialContext.makeLineString(java.util.List) so that we can more
efficiently get the LineString without creating a List<Point> . |
protected Shape |
JtsWktShapeParser.parseMulitPolygonShape(WktShapeParser.State state)
Parses a MULTIPOLYGON shape from the raw string.
|
protected Shape |
JtsWktShapeParser.parsePolygonShape(WktShapeParser.State state)
Parses a POLYGON shape from the raw string.
|
protected Shape |
JtsWktShapeParser.parseShapeByType(WktShapeParser.State state,
String shapeType) |
Shape |
JtsBinaryCodec.readJtsGeom(DataInput dataInput) |
protected Shape |
JtsBinaryCodec.readShapeByTypeIfSupported(DataInput dataInput,
byte type) |
Modifier and Type | Method and Description |
---|---|
protected byte |
JtsBinaryCodec.typeForShape(Shape s) |
void |
JtsBinaryCodec.writeJtsGeom(DataOutput dataOutput,
Shape s) |
protected boolean |
JtsBinaryCodec.writeShapeByTypeIfSupported(DataOutput dataOutput,
Shape s,
byte type) |
Modifier and Type | Class and Description |
---|---|
class |
ShapeCollection<S extends Shape>
A collection of Shape objects, analogous to an OGC GeometryCollection.
|
Modifier and Type | Interface and Description |
---|---|
interface |
Circle
A circle, also known as a point-radius since that is what it is comprised of.
|
interface |
Point
A Point with X & Y coordinates.
|
interface |
Rectangle
A rectangle aligned with the axis (i.e.
|
Modifier and Type | Class and Description |
---|---|
class |
ShapeCollection<S extends Shape>
A collection of Shape objects, analogous to an OGC GeometryCollection.
|
Modifier and Type | Method and Description |
---|---|
Shape |
Shape.getBuffered(double distance,
SpatialContext ctx)
Returns a buffered version of this shape.
|
Modifier and Type | Method and Description |
---|---|
SpatialRelation |
Shape.relate(Shape other)
Describe the relationship between the two objects.
|
SpatialRelation |
ShapeCollection.relate(Shape other) |
Modifier and Type | Method and Description |
---|---|
protected Rectangle |
ShapeCollection.computeBoundingBox(Collection<? extends Shape> shapes,
SpatialContext ctx) |
protected static boolean |
ShapeCollection.computeMutualDisjoint(List<? extends Shape> shapes)
Computes whether the shapes are mutually disjoint.
|
Modifier and Type | Class and Description |
---|---|
class |
BufferedLine
INTERNAL: A line between two points with a buffer distance extending in every direction.
|
class |
BufferedLineString
A BufferedLineString is a collection of
BufferedLine shapes,
resulting in what some call a "Track" or "Polyline" (ESRI terminology). |
class |
CircleImpl
A circle, also known as a point-radius, based on a
DistanceCalculator which does all the work. |
class |
GeoCircle
A circle as it exists on the surface of a sphere.
|
class |
PointImpl
A basic 2D implementation of a Point.
|
class |
RectangleImpl
A simple Rectangle implementation that also supports a longitudinal
wrap-around.
|
Modifier and Type | Method and Description |
---|---|
Shape |
BufferedLineString.getBuffered(double distance,
SpatialContext ctx) |
Shape |
BufferedLine.getBuffered(double distance,
SpatialContext ctx) |
Modifier and Type | Method and Description |
---|---|
SpatialRelation |
RectangleImpl.relate(Shape other) |
SpatialRelation |
CircleImpl.relate(Shape other) |
SpatialRelation |
BufferedLineString.relate(Shape other) |
SpatialRelation |
PointImpl.relate(Shape other) |
SpatialRelation |
BufferedLine.relate(Shape other) |
Modifier and Type | Class and Description |
---|---|
class |
JtsGeometry
Wraps a JTS
Geometry (i.e. |
class |
JtsPoint
Wraps a
Point . |
Modifier and Type | Method and Description |
---|---|
SpatialRelation |
JtsGeometry.relate(Shape other) |
SpatialRelation |
JtsPoint.relate(Shape other) |
Copyright © 2014 LocationTech. All rights reserved.