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<com.vividsolutions.jts.geom.Coordinate> |
points |
protected boolean |
translated |
autoIndexJtsGeometry, autoValidateJtsGeometry, DATELINE, FACTORY, FIELD_COORDINATES, FIELD_GEOMETRIES, FIELD_ORIENTATION, FIELD_TYPE, INTERSECTION_ORDER, LOGGER, multiPolygonMayOverlap, orientation, SPATIAL_CONTEXT, wrapdateline
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
PointCollection() |
protected |
PointCollection(ArrayList<com.vividsolutions.jts.geom.Coordinate> points) |
Modifier and Type | Method and Description |
---|---|
protected com.vividsolutions.jts.geom.Coordinate[] |
coordinates(boolean closed)
Copy all points to a new Array
|
protected XContentBuilder |
coordinatesToXcontent(XContentBuilder builder,
boolean closed)
builds an array of coordinates to a
XContentBuilder |
E |
point(com.vividsolutions.jts.geom.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<? extends com.vividsolutions.jts.geom.Coordinate> coordinates)
Add a collection of points to the collection
|
E |
points(com.vividsolutions.jts.geom.Coordinate... coordinates)
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, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
toXContent
protected final ArrayList<com.vividsolutions.jts.geom.Coordinate> points
protected boolean translated
protected PointCollection()
protected PointCollection(ArrayList<com.vividsolutions.jts.geom.Coordinate> points)
public E point(double longitude, double latitude)
longitude
- longitude of the coordinatelatitude
- latitude of the coordinatepublic E point(com.vividsolutions.jts.geom.Coordinate coordinate)
coordinate
- coordinate of the pointpublic E points(com.vividsolutions.jts.geom.Coordinate... coordinates)
coordinates
- array of Coordinate
s to addpublic E points(Collection<? extends com.vividsolutions.jts.geom.Coordinate> coordinates)
coordinates
- array of Coordinate
s to addprotected com.vividsolutions.jts.geom.Coordinate[] coordinates(boolean closed)
closed
- if set to true the first point of the array is repeated as last elementprotected XContentBuilder coordinatesToXcontent(XContentBuilder builder, boolean closed) throws IOException
XContentBuilder
builder
- builder to useclosed
- repeat the first point at the end of the array if it's not already defines as last element of the arrayIOException
Copyright © 2009–2016. All rights reserved.