Package com.esri.core.geometry
Class Polygon
java.lang.Object
com.esri.core.geometry.Geometry
com.esri.core.geometry.MultiVertexGeometry
com.esri.core.geometry.MultiPath
com.esri.core.geometry.Polygon
- All Implemented Interfaces:
Serializable
A polygon is a collection of one or many interior or exterior rings.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.esri.core.geometry.Geometry
Geometry.GeometryAccelerationDegree, Geometry.GeometryType, Geometry.Type
-
Field Summary
FieldsFields inherited from class com.esri.core.geometry.Geometry
m_description, m_touchFlag
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
calculateRingArea2D
(int ringIndex) Calculates the ring area for this ring.Creates an instance of an empty geometry of the same type.boolean
Returns TRUE when this geometry has exactly same type, properties, and coordinates as the other geometry.long
Returns an estimate of this object size in bytes.int
Returns the topological dimension of the geometry object based on the geometry's type.int
int
Fill rule for the polygon that defines the interior of the self intersecting polygon.getType()
Returns the geometry type.int
hashCode()
Returns a hash code value for this polygon.void
interpolateAttributes
(int path_index, int from_point_index, int to_point_index) void
interpolateAttributes
(int semantics, int path_index, int from_point_index, int to_point_index) boolean
isExteriorRing
(int partIndex) Returns TRUE if the ring is an exterior ring.void
setFillRule
(int rule) Fill rule for the polygon that defines the interior of the self intersecting polygon.void
setXY
(int i, double x, double y) Sets a new vertex for the polygon.Methods inherited from class com.esri.core.geometry.MultiPath
_getImpl, add, addAttribute, addEnvelope, addEnvelope, addPath, addPath, addSegment, addSegmentsFromPath, applyTransformation, applyTransformation, assignVertexDescription, bezierTo, calculateArea2D, calculateLength2D, calculatePathLength2D, closeAllPaths, closePathWithArc, closePathWithBezier, closePathWithLine, copyTo, dropAllAttributes, dropAttribute, getAttributeAsDbl, getAttributeAsInt, getBoundary, getDescription, getPathCount, getPathEnd, getPathIndexFromPointIndex, getPathSize, getPathStart, getPoint, getPointByVal, getPointCount, getSegmentCount, getSegmentCount, getStateFlag, getXY, getXY, getXYZ, hasNonLinearSegments, hasNonLinearSegments, insertPath, insertPath, insertPoint, insertPoint, insertPoints, insertPoints, isClosedPath, isClosedPathInXYPlane, isEmpty, lineTo, lineTo, lineTo, lineTo, mergeVertexDescription, queryCoordinates, queryCoordinates, queryCoordinates, queryCoordinates, queryEnvelope, queryEnvelope2D, queryEnvelope3D, queryInterval, queryLooseEnvelope, queryLooseEnvelope, queryPathEnvelope2D, querySegmentIterator, querySegmentIteratorAtVertex, removePath, removePoint, replaceNaNs, reverseAllPaths, reversePath, setAttribute, setAttribute, setEmpty, setPoint, setPointByVal, setXY, setXYZ, startPath, startPath, startPath, startPath
Methods inherited from class com.esri.core.geometry.MultiVertexGeometry
_assignVertexDescriptionImpl, getCoordinates2D, getCoordinates3D, getPoint
Methods inherited from class com.esri.core.geometry.Geometry
_clone, _touch, addID, addM, addZ, copy, estimateMemorySize, getDimensionFromType, hasAttribute, hasID, hasM, hasZ, isArea, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment, queryLooseEnvelope2D, queryLooseEnvelope3D, toString, vertex_count, writeReplace
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
Polygon
public Polygon()Creates a polygon. -
Polygon
-
-
Method Details
-
createInstance
Description copied from class:Geometry
Creates an instance of an empty geometry of the same type.- Specified by:
createInstance
in classGeometry
- Returns:
- The new instance.
-
getDimension
public int getDimension()Description copied from class:Geometry
Returns the topological dimension of the geometry object based on the geometry's type.Returns 0 for point and multipoint.
Returns 1 for lines and polylines.
Returns 2 for polygons and envelopes
Returns 3 for objects with volume
- Specified by:
getDimension
in classGeometry
- Returns:
- Returns the integer value of the dimension of geometry.
-
getType
Description copied from class:Geometry
Returns the geometry type. -
estimateMemorySize
public long estimateMemorySize()Description copied from class:Geometry
Returns an estimate of this object size in bytes.This estimate doesn't include the size of the
VertexDescription
object because instances ofVertexDescription
are shared among geometry objects.- Specified by:
estimateMemorySize
in classGeometry
- Returns:
- Returns an estimate of this object size in bytes.
-
calculateRingArea2D
public double calculateRingArea2D(int ringIndex) Calculates the ring area for this ring.- Parameters:
ringIndex
- The index of this ring.- Returns:
- The ring area for this ring.
-
isExteriorRing
public boolean isExteriorRing(int partIndex) Returns TRUE if the ring is an exterior ring. Valid only for simple polygons. -
equals
Returns TRUE when this geometry has exactly same type, properties, and coordinates as the other geometry. -
hashCode
public int hashCode()Returns a hash code value for this polygon. -
setXY
public void setXY(int i, double x, double y) Sets a new vertex for the polygon.- Parameters:
i
- The index of the new vertex.x
- The X coordinate for the new vertex.y
- The Y coordinate for the new vertex.
-
interpolateAttributes
public void interpolateAttributes(int path_index, int from_point_index, int to_point_index) -
interpolateAttributes
public void interpolateAttributes(int semantics, int path_index, int from_point_index, int to_point_index) -
getExteriorRingCount
public int getExteriorRingCount() -
setFillRule
public void setFillRule(int rule) Fill rule for the polygon that defines the interior of the self intersecting polygon. It affects the Simplify operation. Can be use by drawing code to pass around the fill rule of graphic path. This property is not persisted in any format yet. See also Polygon.FillRule. -
getFillRule
public int getFillRule()Fill rule for the polygon that defines the interior of the self intersecting polygon. It affects the Simplify operation. Changing the fill rule on the polygon that has no self intersections has no physical effect. Can be use by drawing code to pass around the fill rule of graphic path. This property is not persisted in any format yet. See also Polygon.FillRule.
-