E - type of the embedding classpublic abstract class BasePolygonBuilder<E extends BasePolygonBuilder<E>> extends ShapeBuilder
BasePolygonBuilder implements the groundwork to create polygons. This contains
Methods to wrap polygons at the dateline and building shapes from the data held by the
builder.
Since this Builder can be embedded to other builders (i.e. MultiPolygonBuilder)
the class of the embedding builder is given by the generic argument E| 修飾子とタイプ | クラスと説明 |
|---|---|
static class |
BasePolygonBuilder.Ring<P extends ShapeBuilder> |
ShapeBuilder.CoordinateNode, ShapeBuilder.Edge, ShapeBuilder.GeoShapeType, ShapeBuilder.OrientationToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected ArrayList<BaseLineStringBuilder<?>> |
holes |
protected BasePolygonBuilder.Ring<E> |
shell |
static ShapeBuilder.GeoShapeType |
TYPE |
autoIndexJtsGeometry, autoValidateJtsGeometry, DATELINE, FACTORY, FIELD_COORDINATES, FIELD_GEOMETRIES, FIELD_ORIENTATION, FIELD_TYPE, INTERSECTION_ORDER, LOGGER, multiPolygonMayOverlap, orientation, SPATIAL_CONTEXT, wrapdatelineEMPTY_PARAMS| コンストラクタと説明 |
|---|
BasePolygonBuilder(ShapeBuilder.Orientation orientation) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
com.spatial4j.core.shape.Shape |
build()
Create a new Shape from this builder.
|
com.vividsolutions.jts.geom.Geometry |
buildGeometry(com.vividsolutions.jts.geom.GeometryFactory factory,
boolean fixDateline) |
ShapeBuilder |
close()
Close the shell of the polygon
|
com.vividsolutions.jts.geom.Coordinate[][][] |
coordinates()
The coordinates setup by the builder will be assembled to a polygon.
|
protected XContentBuilder |
coordinatesArray(XContentBuilder builder,
ToXContent.Params params) |
BasePolygonBuilder.Ring<E> |
hole()
build new hole to the polygon
|
E |
hole(BaseLineStringBuilder<?> hole)
Add a new hole to the polygon
|
protected static com.vividsolutions.jts.geom.LinearRing |
linearRing(com.vividsolutions.jts.geom.GeometryFactory factory,
ArrayList<com.vividsolutions.jts.geom.Coordinate> coordinates) |
protected static com.vividsolutions.jts.geom.MultiPolygon |
multipolygon(com.vividsolutions.jts.geom.GeometryFactory factory,
com.vividsolutions.jts.geom.Coordinate[][][] polygons)
Create a Multipolygon from a set of coordinates.
|
E |
point(com.vividsolutions.jts.geom.Coordinate coordinate)
Add a point to the shell of the polygon
|
E |
point(double longitude,
double latitude) |
E |
points(com.vividsolutions.jts.geom.Coordinate... coordinates)
Add a array of points to the shell of the polygon
|
protected static com.vividsolutions.jts.geom.Polygon |
polygon(com.vividsolutions.jts.geom.GeometryFactory factory,
com.vividsolutions.jts.geom.Coordinate[][] polygon) |
com.vividsolutions.jts.geom.Polygon |
toPolygon() |
protected com.vividsolutions.jts.geom.Polygon |
toPolygon(com.vividsolutions.jts.geom.GeometryFactory factory) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
ShapeBuilder.GeoShapeType |
type()
get the shapes type
|
protected void |
validateHole(BaseLineStringBuilder shell,
BaseLineStringBuilder hole)
Validates only 1 vertex is tangential (shared) between the interior and exterior of a polygon
|
coordinate, debugEnabled, intersection, intersections, jtsGeometry, newCircleBuilder, newEnvelope, newEnvelope, newGeometryCollection, newGeometryCollection, newLineString, newMultiLinestring, newMultiPoint, newMultiPolygon, newMultiPolygon, newPoint, newPoint, newPolygon, newPolygon, orientationFromString, parse, parse, shift, toString, toXContentpublic static final ShapeBuilder.GeoShapeType TYPE
protected BasePolygonBuilder.Ring<E extends BasePolygonBuilder<E>> shell
protected final ArrayList<BaseLineStringBuilder<?>> holes
public BasePolygonBuilder(ShapeBuilder.Orientation orientation)
public E point(double longitude, double latitude)
public E point(com.vividsolutions.jts.geom.Coordinate coordinate)
coordinate - coordinate of the new pointpublic E points(com.vividsolutions.jts.geom.Coordinate... coordinates)
coordinates - coordinates of the new points to addpublic E hole(BaseLineStringBuilder<?> hole)
hole - linear ring defining the holepublic BasePolygonBuilder.Ring<E> hole()
public ShapeBuilder close()
protected void validateHole(BaseLineStringBuilder shell, BaseLineStringBuilder hole)
public com.vividsolutions.jts.geom.Coordinate[][][] coordinates()
public com.spatial4j.core.shape.Shape build()
ShapeBuilderbuild クラス内 ShapeBuilderShape defined by the builderprotected XContentBuilder coordinatesArray(XContentBuilder builder, ToXContent.Params params) throws IOException
IOExceptionpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOExceptionpublic com.vividsolutions.jts.geom.Geometry buildGeometry(com.vividsolutions.jts.geom.GeometryFactory factory,
boolean fixDateline)
public com.vividsolutions.jts.geom.Polygon toPolygon()
protected com.vividsolutions.jts.geom.Polygon toPolygon(com.vividsolutions.jts.geom.GeometryFactory factory)
protected static com.vividsolutions.jts.geom.LinearRing linearRing(com.vividsolutions.jts.geom.GeometryFactory factory,
ArrayList<com.vividsolutions.jts.geom.Coordinate> coordinates)
public ShapeBuilder.GeoShapeType type()
ShapeBuildertype クラス内 ShapeBuilderprotected static com.vividsolutions.jts.geom.Polygon polygon(com.vividsolutions.jts.geom.GeometryFactory factory,
com.vividsolutions.jts.geom.Coordinate[][] polygon)
protected static com.vividsolutions.jts.geom.MultiPolygon multipolygon(com.vividsolutions.jts.geom.GeometryFactory factory,
com.vividsolutions.jts.geom.Coordinate[][][] polygons)
factory - GeometryFactory to usepolygons - definition of polygonsCopyright © 2009–2016. All rights reserved.