public interface ShapeFactory
Shape
s.
Stateless and thread-safe, except for any returned builders.Modifier and Type | Interface and Description |
---|---|
static interface |
ShapeFactory.LineStringBuilder |
static interface |
ShapeFactory.MultiLineStringBuilder |
static interface |
ShapeFactory.MultiPointBuilder |
static interface |
ShapeFactory.MultiPolygonBuilder |
static interface |
ShapeFactory.MultiShapeBuilder<T extends Shape> |
static interface |
ShapeFactory.PointsBuilder<T>
Builds a point and returns the generic specified type (usually whatever "this" is).
|
static interface |
ShapeFactory.PolygonBuilder |
Modifier and Type | Method and Description |
---|---|
Circle |
circle(double x,
double y,
double distance)
Construct a circle.
|
Circle |
circle(Point point,
double distance)
Construct a circle.
|
SpatialContext |
getSpatialContext() |
boolean |
isNormWrapLongitude()
If true then
normX(double) will wrap longitudes outside of the standard
geodetic boundary into it. |
ShapeFactory.LineStringBuilder |
lineString()
(Builder) Constructs a line string, with a possible buffer.
|
Shape |
lineString(List<Point> points,
double buf)
Deprecated.
|
ShapeFactory.MultiLineStringBuilder |
multiLineString()
(Builder) Constructs a MultiLineString, or possibly the result of that buffered.
|
ShapeFactory.MultiPointBuilder |
multiPoint()
(Builder) Constructs a MultiPoint.
|
ShapeFactory.MultiPolygonBuilder |
multiPolygon()
(Builder) Constructs a MultiPolygon.
|
<T extends Shape> |
multiShape(Class<T> shapeClass)
(Builder) Constructs a Shape aggregate in which each component/member
is an instance of the specified class.
|
<S extends Shape> |
multiShape(List<S> coll)
Deprecated.
|
double |
normDist(double d)
Called to normalize a value that isn't X or Y or Z.
|
double |
normX(double x)
Normalize the 'x' dimension.
|
double |
normY(double y) |
double |
normZ(double z)
(disclaimer: the Z dimension isn't fully supported)
|
default Point |
pointLatLon(double latitude,
double longitude)
Construct a point of latitude, longitude coordinates
|
Point |
pointXY(double x,
double y)
Construct a point.
|
Point |
pointXYZ(double x,
double y,
double z)
Construct a point of 3 dimensions.
|
ShapeFactory.PolygonBuilder |
polygon()
(Builder) Constructs a polygon.
|
Rectangle |
rect(double minX,
double maxX,
double minY,
double maxY)
Construct a rectangle.
|
Rectangle |
rect(Point lowerLeft,
Point upperRight)
Construct a rectangle.
|
void |
verifyX(double x)
Ensure fits in the world bounds.
|
void |
verifyY(double y) |
void |
verifyZ(double z)
(disclaimer: the Z dimension isn't fully supported)
|
SpatialContext getSpatialContext()
boolean isNormWrapLongitude()
normX(double)
will wrap longitudes outside of the standard
geodetic boundary into it. Example: 181 will become -179.double normX(double x)
ShapeReader
s before creating a shape.double normY(double y)
normX(double)
double normZ(double z)
normX(double)
double normDist(double d)
SpatialContext.normX(double)
& normY & normZ. This
is called by a ShapeReader
before creating a shape.void verifyX(double x)
void verifyY(double y)
verifyX(double)
void verifyZ(double z)
verifyX(double)
Point pointXY(double x, double y)
default Point pointLatLon(double latitude, double longitude)
Point pointXYZ(double x, double y, double z)
Rectangle rect(double minX, double maxX, double minY, double maxY)
SpatialContext.isGeo()
then potentially adjust its sign to ensure the rectangle does not cross the
dateline (aka anti-meridian).Circle circle(double x, double y, double distance)
Circle circle(Point point, double distance)
@Deprecated Shape lineString(List<Point> points, double buf)
@Deprecated <S extends Shape> ShapeCollection<S> multiShape(List<S> coll)
ShapeFactory.LineStringBuilder lineString()
ShapeFactory.PolygonBuilder polygon()
<T extends Shape> ShapeFactory.MultiShapeBuilder<T> multiShape(Class<T> shapeClass)
ShapeFactory.MultiPointBuilder multiPoint()
ShapeFactory.MultiLineStringBuilder multiLineString()
ShapeFactory.MultiPolygonBuilder multiPolygon()
Copyright © 2020 LocationTech. All rights reserved.