public abstract class PointCollection<E extends PointCollection<E>> extends ShapeBuilder
PointCollection is an abstract base implementation for all GeoShapes. It simply handles a set of points.
ShapeBuilder.CoordinateNode , ShapeBuilder.Edge , ShapeBuilder.GeoShapeType , ShapeBuilder.Orientation ToXContent.DelegatingMapParams , ToXContent.MapParams , ToXContent.Params | Modifier and Type | Field and Description |
|---|---|
protected ArrayList |
points
|
protected boolean |
translated
|
autoIndexJtsGeometry, autoValidateJtsGeometry, DATELINE, FACTORY, FIELD_COORDINATES, FIELD_GEOMETRIES, FIELD_ORIENTATION, FIELD_TYPE, INTERSECTION_ORDER, LOGGER, multiPolygonMayOverlap, orientation, SPATIAL_CONTEXT, wrapdatelineEMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
PointCollection()
|
protected |
PointCollection(ArrayList
|
| Modifier and Type | Method and Description |
|---|---|
protected Coordinate |
coordinates(boolean closed)
Copy all points to a new Array
|
protected XContentBuilder |
coordinatesToXcontent(XContentBuilder
builds an array of coordinates to a
XContentBuilder
|
E |
point(Coordinate coordinate)
Add a new point to the collection
|
E |
point(double longitude, double latitude)
Add a new point to the collection
|
E |
points(Collection
Add a collection of points to the collection
|
E |
points(Coordinate
Add a array of points to the collection
|
build, coordinate, debugEnabled, intersection, intersections, jtsGeometry, newCircleBuilder, newEnvelope, newEnvelope, newGeometryCollection, newGeometryCollection, newLineString, newMultiLinestring, newMultiPoint, newMultiPolygon, newMultiPolygon, newPoint, newPoint, newPolygon, newPolygon, orientationFromString, parse, parse, shift, toString, toXContent, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittoXContentprotected final ArrayList<Coordinate > points
protected boolean translated
protected PointCollection()
protected PointCollection(ArrayList<Coordinate > points)
public E point(double longitude, double latitude)
longitude - longitude of the coordinate
latitude - latitude of the coordinate
public E point(Coordinate coordinate)
coordinate - coordinate of the point
public E points(Coordinate... coordinates)
coordinates - array of
Coordinates to add
public E points(Collection<? extends Coordinate > coordinates)
coordinates - array of
Coordinates to add
protected Coordinate[] coordinates(boolean closed)
closed - if set to true the first point of the array is repeated as last element
protected XContentBuildercoordinatesToXcontent(XContentBuilder builder, boolean closed) throws IOException
XContentBuilder
builder - builder to use
closed - repeat the first point at the end of the array if it's not already defines as last element of the array
IOException -