public class PolygonImpl extends AbstractPolygon implements Polygon
LinearRings.
The boundary rings of the polygon may have any orientation.
Polygons are closed, simple geometries by definition.
The polygon model conforms to the assertions specified in the OpenGIS Simple Features Specification for SQL.
A Polygon is topologically valid if and only if:
| Constructor and Description |
|---|
PolygonImpl(GeometryFactory geometryFactory) |
PolygonImpl(GeometryFactory factory,
LinearRing... rings)
Constructs a
Polygon with the given exterior boundary and
interior boundaries. |
| Modifier and Type | Method and Description |
|---|---|
PolygonImpl |
clone()
Creates and returns a full copy of this
Polygon object. |
BoundingBox |
getBoundingBox()
Gets an
BoundingBoxDoubleGf containing
the minimum and maximum x and y values in this Geometry. |
GeometryFactory |
getGeometryFactory()
Gets the geometryFactory which contains the context in which this geometry was created.
|
LinearRing |
getRing(int ringIndex) |
int |
getRingCount() |
List<LinearRing> |
getRings() |
Object |
getUserData()
Gets the user data object for this geometry, if any.
|
boolean |
isEmpty()
Tests whether the set of points covered by this
Geometry is
empty. |
void |
setUserData(Object userData)
A simple scheme for applications to add their own custom data to a Geometry.
|
appendVertex, compareToSameClass, computeBoundingBox, convexHull, copy, deleteVertex, doEquals, equalsExact, getArea, getBoundary, getBoundaryDimension, getDataType, getDimension, getExteriorRing, getGeometryComponents, getInteriorRing, getLength, getNumInteriorRing, getPoint, getPointWithin, getSegment, getToVertex, getVertex, getVertexCount, holes, insertVertex, intersects, isEquivalentClass, isRectangle, minCoordinateIndex, move, moveVertex, normalize, prepare, reverse, rings, scroll, segments, toClockwise, toCounterClockwise, verticesbuffer, buffer, buffer, checkNotGeometryCollection, compare, compareTo, contains, containsProperly, convert, convert, coveredBy, covers, createVertexId, crosses, difference, disjoint, distance, envelopeCovers, envelopesIntersect, equal, equals, equals, equals, equalsExact, equalsNorm, equalsTopo, geometries, getAxisCount, getCentroid, getClassSortIndex, getCoordinateSystem, getEnvelope, getGeometries, getGeometries, getGeometry, getGeometryCount, getGeometryType, getInteriorPoint, getNonZeroGeometryFactory, getSrid, getVertexIndex, hashCode, hasInvalidXyCoordinates, hasNonEmptyElements, hasNullElements, intersection, intersects, isAnyTargetComponentInTest, isGeometryCollection, isSimple, isValid, isWithinDistance, overlaps, relate, relate, setVertexIndex, symDifference, toString, touches, toWkt, union, union, withinfinalize, getClass, notify, notifyAll, wait, wait, waitgetExteriorRing, getInteriorRing, getNumInteriorRing, holes, move, normalize, prepare, reverse, ringsappendVertex, buffer, buffer, buffer, compareTo, compareToSameClass, contains, containsProperly, convert, convert, convexHull, copy, coveredBy, covers, crosses, deleteVertex, difference, disjoint, distance, equal, equals, equals, equals, equalsExact, equalsExact, equalsNorm, equalsTopo, geometries, getArea, getAxisCount, getBoundary, getBoundaryDimension, getCentroid, getClassSortIndex, getCoordinateSystem, getDimension, getEnvelope, getGeometries, getGeometries, getGeometry, getGeometryComponents, getGeometryCount, getGeometryType, getInteriorPoint, getLength, getPoint, getPointWithin, getSegment, getSrid, getToVertex, getVertex, getVertexCount, hashCode, hasInvalidXyCoordinates, insertVertex, intersection, intersects, intersects, isRectangle, isSimple, isValid, isWithinDistance, moveVertex, overlaps, relate, relate, segments, symDifference, toClockwise, toCounterClockwise, touches, toWkt, union, union, vertices, withingetDataTypepublic PolygonImpl(GeometryFactory geometryFactory)
public PolygonImpl(GeometryFactory factory, LinearRing... rings)
Polygon with the given exterior boundary and
interior boundaries.shell - the outer boundary of the new Polygon,
or null or an empty LinearRing if the empty
geometry is to be created.holes - the inner boundaries of the new Polygon
, or null or empty LinearRings if the empty
geometry is to be created.public PolygonImpl clone()
Polygon object.
(including all coordinates contained by it).public BoundingBox getBoundingBox()
AbstractGeometryBoundingBoxDoubleGf containing
the minimum and maximum x and y values in this Geometry.
If the geometry is empty, an empty BoundingBoxDoubleGf
is returned.
The returned object is a copy of the one maintained internally, to avoid aliasing issues. For best performance, clients which access this boundingBox frequently should cache the return value.
getBoundingBox in interface GeometrygetBoundingBox in interface PolygonalgetBoundingBox in class AbstractGeometryGeometry.public GeometryFactory getGeometryFactory()
GeometrygetGeometryFactory in interface GeometrygetGeometryFactory in class AbstractPolygonpublic LinearRing getRing(int ringIndex)
public int getRingCount()
getRingCount in interface Polygonpublic List<LinearRing> getRings()
public Object getUserData()
getUserData in interface GeometrygetUserData in class AbstractGeometrynull if none setpublic boolean isEmpty()
AbstractGeometryGeometry is
empty.isEmpty in interface GeometryisEmpty in class AbstractPolygontrue if this Geometry does not cover any pointspublic void setUserData(Object userData)
Note that user data objects are not present in geometries created by construction methods.
setUserData in interface GeometrysetUserData in class AbstractGeometryuserData - an object, the semantics for which are defined by the
application using this GeometryCopyright © 2015 Revolution Systems Inc.. All rights reserved.