public class ShapeFactoryImpl extends Object implements ShapeFactory
ShapeFactory. It does not support polygon shapes.| Modifier and Type | Class and Description |
|---|---|
protected class |
ShapeFactoryImpl.GeneralShapeMultiShapeBuilder<T extends Shape> |
ShapeFactory.LineStringBuilder, ShapeFactory.MultiLineStringBuilder, ShapeFactory.MultiPointBuilder, ShapeFactory.MultiPolygonBuilder, ShapeFactory.MultiShapeBuilder<T extends Shape>, ShapeFactory.PointsBuilder<T>, ShapeFactory.PolygonBuilder| Modifier and Type | Field and Description |
|---|---|
protected SpatialContext |
ctx |
| Constructor and Description |
|---|
ShapeFactoryImpl(SpatialContext ctx,
SpatialContextFactory factory) |
| 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
ShapeFactory.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)
Constructs a line string with a possible buffer.
|
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)
Construct a ShapeCollection, analogous to an OGC GeometryCollection.
|
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)
|
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)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpointLatLonprotected final SpatialContext ctx
public ShapeFactoryImpl(SpatialContext ctx, SpatialContextFactory factory)
public SpatialContext getSpatialContext()
getSpatialContext in interface ShapeFactorypublic boolean isNormWrapLongitude()
ShapeFactoryShapeFactory.normX(double) will wrap longitudes outside of the standard
geodetic boundary into it. Example: 181 will become -179.isNormWrapLongitude in interface ShapeFactorypublic double normX(double x)
ShapeFactoryShapeReaders before creating a shape.normX in interface ShapeFactorypublic double normY(double y)
normY in interface ShapeFactoryShapeFactory.normX(double)public double normZ(double z)
ShapeFactorynormZ in interface ShapeFactoryShapeFactory.normX(double)public double normDist(double d)
ShapeFactorySpatialContext.normX(double) & normY & normZ. This
is called by a ShapeReader before creating a shape.normDist in interface ShapeFactorypublic void verifyX(double x)
ShapeFactoryverifyX in interface ShapeFactorypublic void verifyY(double y)
verifyY in interface ShapeFactoryShapeFactory.verifyX(double)public void verifyZ(double z)
ShapeFactoryverifyZ in interface ShapeFactoryShapeFactory.verifyX(double)public Point pointXY(double x, double y)
ShapeFactorypointXY in interface ShapeFactorypublic Point pointXYZ(double x, double y, double z)
ShapeFactorypointXYZ in interface ShapeFactorypublic Rectangle rect(Point lowerLeft, Point upperRight)
ShapeFactoryrect in interface ShapeFactorypublic Rectangle rect(double minX, double maxX, double minY, double maxY)
ShapeFactorySpatialContext.isGeo()
then potentially adjust its sign to ensure the rectangle does not cross the
dateline (aka anti-meridian).rect in interface ShapeFactorypublic Circle circle(double x, double y, double distance)
ShapeFactorycircle in interface ShapeFactorypublic Circle circle(Point point, double distance)
ShapeFactorycircle in interface ShapeFactorypublic Shape lineString(List<Point> points, double buf)
ShapeFactorylineString in interface ShapeFactorypublic ShapeFactory.LineStringBuilder lineString()
ShapeFactorylineString in interface ShapeFactorypublic <S extends Shape> ShapeCollection<S> multiShape(List<S> coll)
ShapeFactorymultiShape in interface ShapeFactorypublic <T extends Shape> ShapeFactory.MultiShapeBuilder<T> multiShape(Class<T> shapeClass)
ShapeFactorymultiShape in interface ShapeFactorypublic ShapeFactory.MultiPointBuilder multiPoint()
ShapeFactorymultiPoint in interface ShapeFactorypublic ShapeFactory.MultiLineStringBuilder multiLineString()
ShapeFactorymultiLineString in interface ShapeFactorypublic ShapeFactory.MultiPolygonBuilder multiPolygon()
ShapeFactorymultiPolygon in interface ShapeFactorypublic ShapeFactory.PolygonBuilder polygon()
ShapeFactorypolygon in interface ShapeFactoryCopyright © 2020 LocationTech. All rights reserved.