Package | Description |
---|---|
org.locationtech.spatial4j.context |
SpatialContext implementations are the facade to the Spatial4j API.
|
org.locationtech.spatial4j.context.jts | |
org.locationtech.spatial4j.distance |
Ways to calculate distance.
|
org.locationtech.spatial4j.io |
Reading & writing shapes in various forms.
|
org.locationtech.spatial4j.io.jackson |
Optional support to read/write Shapes and Geometry using Jackson
|
org.locationtech.spatial4j.shape |
Shapes are the core geometry objects that Spatial4j provides.
|
org.locationtech.spatial4j.shape.impl | |
org.locationtech.spatial4j.shape.jts |
Modifier and Type | Field and Description |
---|---|
static SpatialContext |
SpatialContext.GEO
A popular default SpatialContext implementation for geospatial.
|
Modifier and Type | Method and Description |
---|---|
static SpatialContext |
SpatialContextFactory.makeSpatialContext(Map<String,String> args,
ClassLoader classLoader)
Creates a new
SpatialContext based on configuration in
args . |
SpatialContext |
SpatialContextFactory.newSpatialContext()
Subclasses should simply construct the instance from the initialized configuration.
|
Modifier and Type | Method and Description |
---|---|
BinaryCodec |
SpatialContextFactory.makeBinaryCodec(SpatialContext ctx) |
SupportedFormats |
SpatialContextFactory.makeFormats(SpatialContext ctx) |
ShapeFactory |
SpatialContextFactory.makeShapeFactory(SpatialContext ctx) |
Modifier and Type | Class and Description |
---|---|
class |
JtsSpatialContext
Enhances the default
SpatialContext with support for Polygons (and
other geometries) using JTS. |
Modifier and Type | Method and Description |
---|---|
double |
DistanceCalculator.calcBoxByDistFromPt_yHorizAxisDEG(Point from,
double distDEG,
SpatialContext ctx)
The
Y coordinate of the horizontal axis of a circle that has maximum width. |
double |
CartesianDistCalc.calcBoxByDistFromPt_yHorizAxisDEG(Point from,
double distDEG,
SpatialContext ctx) |
double |
GeodesicSphereDistCalc.calcBoxByDistFromPt_yHorizAxisDEG(Point from,
double distDEG,
SpatialContext ctx) |
Rectangle |
DistanceCalculator.calcBoxByDistFromPt(Point from,
double distDEG,
SpatialContext ctx,
Rectangle reuse)
Calculates the bounding box of a circle, as specified by its center point
and distance.
|
Rectangle |
CartesianDistCalc.calcBoxByDistFromPt(Point from,
double distDEG,
SpatialContext ctx,
Rectangle reuse) |
Rectangle |
GeodesicSphereDistCalc.calcBoxByDistFromPt(Point from,
double distDEG,
SpatialContext ctx,
Rectangle reuse) |
static Rectangle |
DistanceUtils.calcBoxByDistFromPtDEG(double lat,
double lon,
double distDEG,
SpatialContext ctx,
Rectangle reuse)
Calculates the bounding box of a circle, as specified by its center point
and distance.
|
Point |
DistanceCalculator.pointOnBearing(Point from,
double distDEG,
double bearingDEG,
SpatialContext ctx,
Point reuse)
Calculates where a destination point is given an origin (
from )
distance, and bearing (given in degrees -- 0-360). |
Point |
CartesianDistCalc.pointOnBearing(Point from,
double distDEG,
double bearingDEG,
SpatialContext ctx,
Point reuse) |
Point |
GeodesicSphereDistCalc.pointOnBearing(Point from,
double distDEG,
double bearingDEG,
SpatialContext ctx,
Point reuse) |
static Point |
DistanceUtils.pointOnBearingRAD(double startLat,
double startLon,
double distanceRAD,
double bearingRAD,
SpatialContext ctx,
Point reuse)
Given a start point (startLat, startLon), distance, and a bearing on a sphere, return the destination point.
|
Modifier and Type | Field and Description |
---|---|
protected SpatialContext |
WKTReader.ctx |
protected SpatialContext |
BinaryCodec.ctx |
protected SpatialContext |
GeoJSONReader.ctx |
Modifier and Type | Method and Description |
---|---|
SpatialContext |
WKTReader.State.getCtx() |
Modifier and Type | Method and Description |
---|---|
static Point |
GeohashUtils.decode(String geohash,
SpatialContext ctx)
Decodes the given geohash into a longitude (X) and latitude (Y)
|
static Rectangle |
GeohashUtils.decodeBoundary(String geohash,
SpatialContext ctx)
Returns min-max lon (X), min-max lat (Y).
|
static Shape |
LegacyShapeReader.readShapeOrNull(String str,
SpatialContext ctx)
Deprecated.
Reads the shape specification as defined in the class javadocs.
|
Constructor and Description |
---|
BinaryCodec(SpatialContext ctx,
SpatialContextFactory factory) |
GeoJSONReader(SpatialContext ctx,
SpatialContextFactory factory) |
GeoJSONWriter(SpatialContext ctx,
SpatialContextFactory factory) |
LegacyShapeReader(SpatialContext ctx,
SpatialContextFactory factory)
Deprecated.
|
LegacyShapeWriter(SpatialContext ctx,
SpatialContextFactory factory)
Deprecated.
|
PolyshapeReader(SpatialContext ctx,
SpatialContextFactory factory) |
PolyshapeWriter(SpatialContext ctx,
SpatialContextFactory factory) |
WKTReader(SpatialContext ctx,
SpatialContextFactory factory)
This constructor is required by
SpatialContextFactory.makeFormats(SpatialContext) . |
WktShapeParser(SpatialContext ctx,
SpatialContextFactory factory)
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
SpatialContext |
ShapeDeserializer.ctx |
Constructor and Description |
---|
ShapeDeserializer(SpatialContext ctx) |
Modifier and Type | Class and Description |
---|---|
class |
BaseShape<T extends SpatialContext> |
Modifier and Type | Field and Description |
---|---|
protected T |
BaseShape.ctx |
protected SpatialContext |
ShapeCollection.ctx |
Modifier and Type | Method and Description |
---|---|
SpatialContext |
Shape.getContext()
Get the SpatialContext that created the Shape
|
SpatialContext |
ShapeCollection.getContext() |
SpatialContext |
ShapeFactory.getSpatialContext() |
Modifier and Type | Method and Description |
---|---|
protected Rectangle |
ShapeCollection.computeBoundingBox(Collection<? extends Shape> shapes,
SpatialContext ctx) |
double |
Shape.getArea(SpatialContext ctx)
Calculates the area of the shape, in square-degrees.
|
double |
ShapeCollection.getArea(SpatialContext ctx) |
Shape |
Shape.getBuffered(double distance,
SpatialContext ctx)
Returns a buffered version of this shape.
|
ShapeCollection |
ShapeCollection.getBuffered(double distance,
SpatialContext ctx) |
Constructor and Description |
---|
ShapeCollection(List<S> shapes,
SpatialContext ctx)
WARNING:
shapes is copied by reference. |
Modifier and Type | Field and Description |
---|---|
protected SpatialContext |
ShapeFactoryImpl.ctx |
Modifier and Type | Method and Description |
---|---|
SpatialContext |
ShapeFactoryImpl.getSpatialContext() |
Modifier and Type | Method and Description |
---|---|
double |
RectangleImpl.getArea(SpatialContext ctx) |
double |
BufferedLine.getArea(SpatialContext ctx) |
double |
PointImpl.getArea(SpatialContext ctx) |
double |
CircleImpl.getArea(SpatialContext ctx) |
double |
BufferedLineString.getArea(SpatialContext ctx) |
Rectangle |
RectangleImpl.getBuffered(double distance,
SpatialContext ctx) |
Shape |
BufferedLine.getBuffered(double distance,
SpatialContext ctx) |
Circle |
PointImpl.getBuffered(double distance,
SpatialContext ctx) |
Circle |
CircleImpl.getBuffered(double distance,
SpatialContext ctx) |
Shape |
BufferedLineString.getBuffered(double distance,
SpatialContext ctx) |
static Range |
Range.xRange(Rectangle rect,
SpatialContext ctx)
Deprecated.
|
static Range |
Range.yRange(Rectangle rect,
SpatialContext ctx)
Deprecated.
|
Constructor and Description |
---|
BBoxCalculator(SpatialContext ctx) |
BufferedLine(Point pA,
Point pB,
double buf,
SpatialContext ctx)
Creates a buffered line from pA to pB.
|
BufferedLineString(List<Point> points,
double buf,
boolean expandBufForLongitudeSkew,
SpatialContext ctx) |
BufferedLineString(List<Point> points,
double buf,
SpatialContext ctx)
Needs at least 1 point, usually more than that.
|
CircleImpl(Point p,
double radiusDEG,
SpatialContext ctx) |
GeoCircle(Point p,
double radiusDEG,
SpatialContext ctx) |
PointImpl(double x,
double y,
SpatialContext ctx)
A simple constructor without normalization / validation.
|
RectangleImpl(double minX,
double maxX,
double minY,
double maxY,
SpatialContext ctx)
A simple constructor without normalization / validation.
|
RectangleImpl(Point lowerLeft,
Point upperRight,
SpatialContext ctx)
A convenience constructor which pulls out the coordinates.
|
RectangleImpl(Rectangle r,
SpatialContext ctx)
Copy constructor.
|
ShapeFactoryImpl(SpatialContext ctx,
SpatialContextFactory factory) |
Modifier and Type | Method and Description |
---|---|
double |
JtsPoint.getArea(SpatialContext ctx) |
double |
JtsGeometry.getArea(SpatialContext ctx) |
Circle |
JtsPoint.getBuffered(double distance,
SpatialContext ctx) |
JtsGeometry |
JtsGeometry.getBuffered(double distance,
SpatialContext ctx) |
Copyright © 2020 LocationTech. All rights reserved.