Package | Description |
---|---|
com.spatial4j.core.context |
SpatialContext implementations are the facade to the Spatial4j API.
|
com.spatial4j.core.context.jts | |
com.spatial4j.core.distance |
Ways to calculate distance.
|
com.spatial4j.core.io |
Reading & writing shapes in various forms.
|
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 |
---|---|
Point |
SpatialContext.makePoint(double x,
double y)
Construct a point.
|
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)
Construct a circle.
|
Rectangle |
SpatialContext.makeRectangle(Point lowerLeft,
Point upperRight)
Construct a rectangle.
|
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.
|
Modifier and Type | Method and Description |
---|---|
Point |
JtsSpatialContext.makePoint(double x,
double y) |
Modifier and Type | Method and Description |
---|---|
Shape |
JtsSpatialContext.makeLineString(List<Point> points) |
Modifier and Type | Method and Description |
---|---|
Point |
GeodesicSphereDistCalc.pointOnBearing(Point from,
double distDEG,
double bearingDEG,
SpatialContext ctx,
Point reuse) |
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) |
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 |
GeodesicSphereDistCalc.calcBoxByDistFromPt_yHorizAxisDEG(Point from,
double distDEG,
SpatialContext ctx) |
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) |
Rectangle |
GeodesicSphereDistCalc.calcBoxByDistFromPt(Point from,
double distDEG,
SpatialContext ctx,
Rectangle reuse) |
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) |
double |
GeodesicSphereDistCalc.distance(Point from,
double toX,
double toY) |
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 |
DistanceCalculator.distance(Point from,
Point to)
The distance between
from and to . |
double |
AbstractDistanceCalculator.distance(Point from,
Point to) |
Point |
GeodesicSphereDistCalc.pointOnBearing(Point from,
double distDEG,
double bearingDEG,
SpatialContext ctx,
Point reuse) |
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) |
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 |
CartesianDistCalc.within(Point from,
double toX,
double toY,
double distance) |
boolean |
AbstractDistanceCalculator.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 latitude and longitude
|
protected Point |
WKTReader.point(WKTReader.State state)
Reads a raw Point (AKA Coordinate) from the current position.
|
Point |
BinaryCodec.readPoint(DataInput dataInput) |
Modifier and Type | Method and Description |
---|---|
protected List<Point> |
WKTReader.pointList(WKTReader.State state)
Reads a list of Points (AKA CoordinateSequence) from the current position.
|
List<Point> |
PolyshapeReader.XReader.readPoints(SpatialContext ctx) |
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 |
ShapeCollection.getCenter() |
Point |
Shape.getCenter()
Returns the center point of this shape.
|
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 |
CircleImpl.getCenter() |
Point |
BufferedLineString.getCenter() |
Point |
BufferedLine.getCenter() |
Modifier and Type | Method and Description |
---|---|
List<Point> |
BufferedLineString.getPoints() |
Modifier and Type | Method and Description |
---|---|
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
|
SpatialRelation |
RectangleImpl.relate(Point point) |
SpatialRelation |
CircleImpl.relate(Point point) |
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() |
Modifier and Type | Method and Description |
---|---|
SpatialRelation |
JtsGeometry.relate(Point pt) |
Copyright © 2015. All rights reserved.