Uses of Class
org.locationtech.spatial4j.context.SpatialContext
Packages that use SpatialContext
Package
Description
SpatialContext implementations are the facade to the Spatial4j API.
Ways to calculate distance.
Reading & writing shapes in various forms.
Optional support to read/write Shapes and Geometry using Jackson
Shapes are the core geometry objects that Spatial4j provides.
-
Uses of SpatialContext in org.locationtech.spatial4j.context
Fields in org.locationtech.spatial4j.context declared as SpatialContextModifier and TypeFieldDescriptionstatic final SpatialContext
SpatialContext.GEO
A popular default SpatialContext implementation for geospatial.Methods in org.locationtech.spatial4j.context that return SpatialContextModifier and TypeMethodDescriptionstatic SpatialContext
SpatialContextFactory.makeSpatialContext
(Map<String, String> args, ClassLoader classLoader) Creates a newSpatialContext
based on configuration inargs
.SpatialContextFactory.newSpatialContext()
Subclasses should simply construct the instance from the initialized configuration.Methods in org.locationtech.spatial4j.context with parameters of type SpatialContextModifier and TypeMethodDescriptionSpatialContextFactory.makeBinaryCodec
(SpatialContext ctx) SpatialContextFactory.makeFormats
(SpatialContext ctx) SpatialContextFactory.makeShapeFactory
(SpatialContext ctx) -
Uses of SpatialContext in org.locationtech.spatial4j.context.jts
Subclasses of SpatialContext in org.locationtech.spatial4j.context.jtsModifier and TypeClassDescriptionclass
Enhances the defaultSpatialContext
with support for Polygons (and other geometries) using JTS. -
Uses of SpatialContext in org.locationtech.spatial4j.distance
Methods in org.locationtech.spatial4j.distance with parameters of type SpatialContextModifier and TypeMethodDescriptionCartesianDistCalc.calcBoxByDistFromPt
(Point from, double distDEG, SpatialContext ctx, Rectangle reuse) 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.GeodesicSphereDistCalc.calcBoxByDistFromPt
(Point from, double distDEG, SpatialContext ctx, Rectangle reuse) double
CartesianDistCalc.calcBoxByDistFromPt_yHorizAxisDEG
(Point from, double distDEG, SpatialContext ctx) double
DistanceCalculator.calcBoxByDistFromPt_yHorizAxisDEG
(Point from, double distDEG, SpatialContext ctx) TheY
coordinate of the horizontal axis of a circle that has maximum width.double
GeodesicSphereDistCalc.calcBoxByDistFromPt_yHorizAxisDEG
(Point from, double distDEG, SpatialContext ctx) 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.CartesianDistCalc.pointOnBearing
(Point from, double distDEG, double bearingDEG, SpatialContext ctx, Point reuse) 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).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. -
Uses of SpatialContext in org.locationtech.spatial4j.io
Fields in org.locationtech.spatial4j.io declared as SpatialContextModifier and TypeFieldDescriptionprotected final SpatialContext
BinaryCodec.ctx
protected final SpatialContext
GeoJSONReader.ctx
(package private) final SpatialContext
LegacyShapeReader.ctx
Deprecated.(package private) final SpatialContext
LegacyShapeWriter.ctx
Deprecated.(package private) final SpatialContext
PolyshapeReader.ctx
protected final SpatialContext
WKTReader.ctx
Methods in org.locationtech.spatial4j.io that return SpatialContextMethods in org.locationtech.spatial4j.io with parameters of type SpatialContextModifier and TypeMethodDescriptionstatic 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).private static Point
LegacyShapeReader.readLatCommaLonPoint
(String value, SpatialContext ctx) Deprecated.Reads geospatial latitude then a comma then longitude.static Shape
LegacyShapeReader.readShapeOrNull
(String str, SpatialContext ctx) Deprecated.Reads the shape specification as defined in the class javadocs.Constructors in org.locationtech.spatial4j.io with parameters of type SpatialContextModifierConstructorDescriptionBinaryCodec
(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 bySpatialContextFactory.makeFormats(SpatialContext)
.WktShapeParser
(SpatialContext ctx, SpatialContextFactory factory) Deprecated. -
Uses of SpatialContext in org.locationtech.spatial4j.io.jackson
Fields in org.locationtech.spatial4j.io.jackson declared as SpatialContextConstructors in org.locationtech.spatial4j.io.jackson with parameters of type SpatialContext -
Uses of SpatialContext in org.locationtech.spatial4j.shape
Classes in org.locationtech.spatial4j.shape with type parameters of type SpatialContextFields in org.locationtech.spatial4j.shape declared as SpatialContextModifier and TypeFieldDescriptionprotected final T
BaseShape.ctx
protected final SpatialContext
ShapeCollection.ctx
Methods in org.locationtech.spatial4j.shape that return SpatialContextModifier and TypeMethodDescriptionShape.getContext()
Get the SpatialContext that created the ShapeShapeCollection.getContext()
ShapeFactory.getSpatialContext()
Methods in org.locationtech.spatial4j.shape with parameters of type SpatialContextModifier and TypeMethodDescriptionprotected 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.getBuffered
(double distance, SpatialContext ctx) Returns a buffered version of this shape.ShapeCollection.getBuffered
(double distance, SpatialContext ctx) Constructors in org.locationtech.spatial4j.shape with parameters of type SpatialContextModifierConstructorDescriptionShapeCollection
(List<S> shapes, SpatialContext ctx) WARNING:shapes
is copied by reference. -
Uses of SpatialContext in org.locationtech.spatial4j.shape.impl
Fields in org.locationtech.spatial4j.shape.impl declared as SpatialContextModifier and TypeFieldDescriptionprivate final SpatialContext
BBoxCalculator.ctx
protected final SpatialContext
ShapeFactoryImpl.ctx
Methods in org.locationtech.spatial4j.shape.impl that return SpatialContextMethods in org.locationtech.spatial4j.shape.impl with parameters of type SpatialContextModifier and TypeMethodDescriptiondouble
BufferedLine.getArea
(SpatialContext ctx) double
BufferedLineString.getArea
(SpatialContext ctx) double
CircleImpl.getArea
(SpatialContext ctx) double
PointImpl.getArea
(SpatialContext ctx) double
RectangleImpl.getArea
(SpatialContext ctx) BufferedLine.getBuffered
(double distance, SpatialContext ctx) BufferedLineString.getBuffered
(double distance, SpatialContext ctx) CircleImpl.getBuffered
(double distance, SpatialContext ctx) PointImpl.getBuffered
(double distance, SpatialContext ctx) RectangleImpl.getBuffered
(double distance, SpatialContext ctx) private SpatialRelation
GeoCircle.relateRectangleCircleWrapsPole
(Rectangle r, SpatialContext ctx) static Range
Range.xRange
(Rectangle rect, SpatialContext ctx) Deprecated.static Range
Range.yRange
(Rectangle rect, SpatialContext ctx) Deprecated.Constructors in org.locationtech.spatial4j.shape.impl with parameters of type SpatialContextModifierConstructorDescriptionBufferedLine
(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) -
Uses of SpatialContext in org.locationtech.spatial4j.shape.jts
Methods in org.locationtech.spatial4j.shape.jts with parameters of type SpatialContextModifier and TypeMethodDescriptiondouble
JtsGeometry.getArea
(SpatialContext ctx) double
JtsPoint.getArea
(SpatialContext ctx) JtsGeometry.getBuffered
(double distance, SpatialContext ctx) JtsPoint.getBuffered
(double distance, SpatialContext ctx)