Package | Description |
---|---|
org.locationtech.spatial4j.context |
SpatialContext implementations are the facade to the Spatial4j API.
|
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 | Method and Description |
---|---|
Point |
SpatialContext.makePoint(double x,
double y)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
double |
SpatialContext.calcDistance(Point p,
double x2,
double y2)
Convenience that uses
SpatialContext.getDistCalc() |
double |
SpatialContext.calcDistance(Point p,
Point p2)
Convenience that uses
SpatialContext.getDistCalc() |
Circle |
SpatialContext.makeCircle(Point point,
double distance)
Deprecated.
|
Rectangle |
SpatialContext.makeRectangle(Point lowerLeft,
Point upperRight)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Shape |
SpatialContext.makeBufferedLineString(List<Point> points,
double buf)
Deprecated.
|
Shape |
SpatialContext.makeLineString(List<Point> points)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
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 | 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) |
double |
DistanceCalculator.distance(Point from,
double toX,
double toY)
The distance between
from and Point(toX,toY) . |
double |
CartesianDistCalc.distance(Point from,
double toX,
double toY) |
double |
GeodesicSphereDistCalc.distance(Point from,
double toX,
double toY) |
double |
DistanceCalculator.distance(Point from,
Point to)
The distance between
from and to . |
double |
AbstractDistanceCalculator.distance(Point from,
Point to) |
double |
CartesianDistCalc.distanceToLineSegment(Point point,
double vX,
double vY,
double wX,
double wY)
Distance from point to a line segment formed between points 'v' and 'w'.
|
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.
|
boolean |
DistanceCalculator.within(Point from,
double toX,
double toY,
double distance)
Returns true if the distance between from and to is <= distance.
|
boolean |
AbstractDistanceCalculator.within(Point from,
double toX,
double toY,
double distance) |
boolean |
CartesianDistCalc.within(Point from,
double toX,
double toY,
double distance) |
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)
|
Point |
OnePointsBuilder.getPoint() |
Point |
BinaryCodec.readPoint(DataInput dataInput) |
Modifier and Type | Method and Description |
---|---|
protected StringBuilder |
WKTWriter.append(StringBuilder buffer,
Point p,
NumberFormat nf) |
void |
BinaryCodec.writePoint(DataOutput dataOutput,
Point pt) |
Modifier and Type | Method and Description |
---|---|
Point |
ShapeDeserializer.readPoint(com.fasterxml.jackson.databind.node.ArrayNode arr,
ShapeFactory factory) |
Modifier and Type | Method and Description |
---|---|
Point |
Shape.getCenter()
Returns the center point of this shape.
|
Point |
ShapeCollection.getCenter() |
default Point |
ShapeFactory.pointLatLon(double latitude,
double longitude)
Construct a point of latitude, longitude coordinates
|
Point |
ShapeFactory.pointXY(double x,
double y)
Construct a point.
|
Point |
ShapeFactory.pointXYZ(double x,
double y,
double z)
Construct a point of 3 dimensions.
|
Modifier and Type | Method and Description |
---|---|
Circle |
ShapeFactory.circle(Point point,
double distance)
Construct a circle.
|
Rectangle |
ShapeFactory.rect(Point lowerLeft,
Point upperRight)
Construct a rectangle.
|
Modifier and Type | Method and Description |
---|---|
Shape |
ShapeFactory.lineString(List<Point> points,
double buf)
Deprecated.
|
Modifier and Type | Class and Description |
---|---|
class |
PointImpl
A basic 2D implementation of a Point.
|
Modifier and Type | Field and Description |
---|---|
protected Point |
CircleImpl.point |
Modifier and Type | Method and Description |
---|---|
Point |
BufferedLine.getA() |
Point |
BufferedLine.getB() |
Point |
RectangleImpl.getCenter() |
Point |
BufferedLine.getCenter() |
Point |
CircleImpl.getCenter() |
Point |
BufferedLineString.getCenter() |
Point |
ShapeFactoryImpl.pointXY(double x,
double y) |
Point |
ShapeFactoryImpl.pointXYZ(double x,
double y,
double z) |
Modifier and Type | Method and Description |
---|---|
List<Point> |
BufferedLineString.getPoints() |
Modifier and Type | Method and Description |
---|---|
Circle |
ShapeFactoryImpl.circle(Point point,
double distance) |
boolean |
BufferedLine.contains(Point p) |
static void |
InfBufLine.cornerByQuadrant(Rectangle r,
int cornerQuad,
Point out) |
double |
InfBufLine.distanceUnbuffered(Point c)
INTERNAL AKA lineToPointDistance
|
static boolean |
PointImpl.equals(Point thiz,
Object o)
All
Point implementations should use this definition of Object.equals(Object) . |
static double |
BufferedLine.expandBufForLongitudeSkew(Point pA,
Point pB,
double buf)
Calls
DistanceUtils.calcLonDegreesAtLat(double, double) given pA or pB's latitude;
whichever is farthest. |
static int |
PointImpl.hashCode(Point thiz)
All
Point implementations should use this definition of Object.hashCode() . |
int |
InfBufLine.quadrant(Point c)
INTERNAL: AKA lineToPointQuadrant
|
Rectangle |
ShapeFactoryImpl.rect(Point lowerLeft,
Point upperRight) |
SpatialRelation |
RectangleImpl.relate(Point point) |
SpatialRelation |
CircleImpl.relate(Point point) |
Modifier and Type | Method and Description |
---|---|
Shape |
ShapeFactoryImpl.lineString(List<Point> points,
double buf) |
Constructor and Description |
---|
BufferedLine(Point pA,
Point pB,
double buf,
SpatialContext ctx)
Creates a buffered line from pA to pB.
|
CircleImpl(Point p,
double radiusDEG,
SpatialContext ctx) |
GeoCircle(Point p,
double radiusDEG,
SpatialContext ctx) |
RectangleImpl(Point lowerLeft,
Point upperRight,
SpatialContext ctx)
A convenience constructor which pulls out the coordinates.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Class and Description |
---|---|
class |
JtsPoint
Wraps a
Point . |
Modifier and Type | Method and Description |
---|---|
Point |
JtsPoint.getCenter() |
Point |
JtsShapeFactory.pointXY(double x,
double y) |
Point |
JtsShapeFactory.pointXYZ(double x,
double y,
double z) |
Modifier and Type | Method and Description |
---|---|
SpatialRelation |
JtsGeometry.relate(Point pt) |
Modifier and Type | Method and Description |
---|---|
Shape |
JtsShapeFactory.lineString(List<Point> points,
double bufferDistance) |
Copyright © 2020 LocationTech. All rights reserved.