Package com.esri.core.geometry
Class MultiPathImpl
java.lang.Object
com.esri.core.geometry.Geometry
com.esri.core.geometry.MultiVertexGeometry
com.esri.core.geometry.MultiVertexGeometryImpl
com.esri.core.geometry.MultiPathImpl
- All Implemented Interfaces:
Serializable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.esri.core.geometry.MultiVertexGeometryImpl
MultiVertexGeometryImpl.DirtyFlags, MultiVertexGeometryImpl.GeometryXSimple
Nested classes/interfaces inherited from class com.esri.core.geometry.Geometry
Geometry.GeometryAccelerationDegree, Geometry.GeometryType, Geometry.Type
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static int[]
protected boolean
protected boolean
protected double
protected double
protected AttributeStreamOfDbl
private int
protected int
private int
protected Point
protected AttributeStreamOfInt8
protected AttributeStreamOfInt32
protected AttributeStreamOfInt8
protected AttributeStreamOfInt32
protected AttributeStreamOfDbl
Fields inherited from class com.esri.core.geometry.MultiVertexGeometryImpl
m_accelerators, m_envelope, m_flagsMask, m_pointCount, m_reservedPointCount, m_simpleTolerance, m_vertexAttributes
Fields inherited from class com.esri.core.geometry.Geometry
m_description, m_touchFlag
-
Constructor Summary
ConstructorsConstructorDescriptionMultiPathImpl
(boolean bPolygon) MultiPathImpl
(boolean bPolygon, VertexDescription description) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_beforeNewSegment
(int resizeBy) boolean
(package private) boolean
boolean
_buildRasterizedGeometryAccelerator
(double toleranceXY, Geometry.GeometryAccelerationDegree accelDegree) (package private) void
\internal CHildren implement this method to copy additional informationprotected void
protected void
_getImpl()
protected void
protected void
_initSegmentData
(int sz) void
protected void
void
void
_updateXYImpl
(boolean bExact) \internal Updates x, y intervals.protected void
\internal Called inside of the VerifyAllStreams to get a child class a chance to do additional verify.void
add
(MultiPathImpl src, boolean bReversePaths) void
addEnvelope
(Envelope2D envSrc, boolean bReverse) adds a rectangular closed Path to the MultiPathImpl.void
addEnvelope
(Envelope envSrc, boolean bReverse) adds a rectangular closed Path to the MultiPathImpl.void
addPath
(MultiPathImpl src, int srcPathIndex, boolean bForward) void
void
addSegment
(Segment segment, boolean bStartNewPath) void
addSegmentsFromPath
(MultiPathImpl src, int src_path_index, int src_segment_from, int src_segment_count, boolean b_start_new_path) void
applyTransformation
(Transformation2D transform) Applies 2D affine transformation in XY plane.void
applyTransformation
(Transformation2D transform, int pathIndex) void
applyTransformation
(Transformation3D transform) Applies 3D affine transformation.void
adds a Cubic Bezier Segment to the current Path.double
Calculates the area of the geometry.(package private) void
calculateEnvelope2D
(Envelope2D env, boolean bExact) double
Calculates the length of the geometry.double
calculatePathLength2D
(int pathIndex) double
calculateRingArea2D
(int pathIndex) (package private) double
calculateSubLength2D
(int path_index, int from_point_index, int to_point_index) (package private) double
calculateSubLength2D
(int from_path_index, int from_point_index, int to_path_index, int to_point_index) (package private) void
void
Closes all open curves by adding an implicit line segment from the end point to the start point.void
closePathWithBezier
(Point2D controlPoint1, Point2D controlPoint2) Closes last path of the MultiPathImpl with the Bezier Segment.(package private) void
(package private) void
closePathWithLine
(int path_index) Creates an instance of an empty geometry of the same type.boolean
long
Returns an estimate of this object size in bytes.Returns boundary of this geometry.int
Returns the topological dimension of the geometry object based on the geometry's type.(package private) int
(package private) int
getHighestPointIndex
(int path_index) (package private) int
int
int
getPathEnd
(int partIndex) Returns a reference to the AttributeStream of Path flags (PathFlags flags).int
getPathIndexFromPointIndex
(int pointIndex) int
getPathSize
(int partIndex) int
getPathStart
(int partIndex) Returns a reference to the AttributeStream of MultiPathImpl parts (Paths).void
getSegment
(int startVertexIndex, SegmentBuffer segBuffer, boolean bStripAttributes) int
Returns total segment count in the MultiPathImpl.int
getSegmentCount
(int path_index) static int
getSegmentDataSize
(byte flag) Returns the size of the segment data for the given segment type.byte
getSegmentFlags
(int ivertex) Returns a reference to the AttributeStream of Segment flags (SegmentFlags flags).getType()
Returns the geometry type.boolean
boolean
int
hashCode()
boolean
boolean
hasNonLinearSegments
(int ipath) Returns True if the given path might have non-linear segments.void
insertPath
(int pathIndex, MultiPathImpl src, int srcPathIndex, boolean bForward) void
insertPath
(int pathIndex, Point2D[] points, int pointsOffset, int count, boolean bForward) void
insertPoint
(int pathIndex, int beforePointIndex, Point pt) void
insertPoint
(int pathIndex, int beforePointIndex, Point2D pt) void
insertPoints
(int pathIndex, int beforePointIndex, MultiPathImpl src, int srcPathIndex, int srcPointIndexFrom, int srcPointCount, boolean bForward) void
insertPoints
(int pathIndex, int beforePointIndex, Point2D[] src, int srcPointIndexFrom, int srcPointCount, boolean bForward) (package private) void
interpolateAttributes
(int path_index, int from_point_index, int to_point_index) (package private) void
interpolateAttributes
(int from_path_index, int from_point_index, int to_path_index, int to_point_index) (package private) void
interpolateAttributes_
(int semantics, int path_index, int from_point_index, int to_point_index, double sub_length, int ordinate) (package private) void
interpolateAttributes_
(int semantics, int from_path_index, int from_point_index, int to_path_index, int to_point_index, double sub_length, int ordinate) (package private) void
interpolateAttributesForSemantics
(int semantics, int path_index, int from_point_index, int to_point_index) (package private) void
interpolateAttributesForSemantics
(int semantics, int from_path_index, int from_point_index, int to_path_index, int to_point_index) boolean
isClosedPath
(int ipath) Returns True if the given path is closed (represents a Ring).boolean
isClosedPathInXYPlane
(int path_index) boolean
Returns True if the class is envelope.boolean
isExteriorRing
(int ringIndex) Returns True if the ring is an exterior ring.void
lineTo
(double x, double y) adds a Line Segment from the last Point to the given endPoint.void
void
void
void
void
openPath
(int pathIndex) void
openPathAndDuplicateStartVertex
(int pathIndex) void
queryLoosePathEnvelope2D
(int path_index, Envelope2D envelope) (package private) void
queryPathEnvelope2D
(int path_index, Envelope2D envelope) querySegmentIteratorAtVertex
(int startVertexIndex) Returns a SegmentIterator that set to a specific vertex of the MultiPathImpl.void
removePath
(int pathIndex) void
removePoint
(int pathIndex, int pointIndex) void
void
reversePath
(int pathIndex) void
setDirtyOGCFlags
(boolean bYesNo) void
setDirtyRingAreas2D
(boolean bYesNo) void
setEmpty()
Returns the geometry to its original initialization state by releasing all data referenced by the geometry.(package private) void
setFillRule
(int rule) void
setPathFlagsStreamRef
(AttributeStreamOfInt8 pathFlags) sets a reference to an AttributeStream of Path flags (PathFlags flags).void
sets a reference to an AttributeStream of MultiPathImpl paths (Paths).void
setRingAreasStreamRef
(AttributeStreamOfDbl ringAreas) void
startPath
(double x, double y) Starts a new Path at the Point.void
void
void
Methods inherited from class com.esri.core.geometry.MultiVertexGeometryImpl
_assignVertexDescriptionImpl, _attributeStreamIsAllocated, _clearAccelerators, _copyToUnsafe, _getAccelerators, _getShortestDistance, _getSimpleTolerance, _hasDirtyFlag, _interpolateTwoVertices, _resizeImpl, _setDirtyFlag, _setEmptyImpl, _updateAllDirtyIntervals, _updateEnvelope, _updateEnvelope, _updateLooseEnvelope, _updateLooseEnvelope, _verifyAllStreams, _verifyAllStreamsImpl, copyTo, getAttributeAsDbl, getAttributeAsInt, getAttributeStreamRef, getDescriptionImpl, getIsSimple, getPoint, getPointByVal, getPointCount, getXY, getXY, getXYZ, isEmpty, isEmptyImpl, notifyModified, queryCoordinates, queryCoordinates, queryCoordinates, queryCoordinates, QueryCoordinates, queryEnvelope, queryEnvelope2D, queryEnvelope3D, queryInterval, queryLooseEnvelope2D, queryLooseEnvelope3D, replaceNaNs, setAttribute, setAttribute, setAttributeStreamRef, setEnvelope, setIsSimple, setPoint, setPointByVal, setXY, setXY, setXYZ, throwIfEmpty, toString
Methods inherited from class com.esri.core.geometry.MultiVertexGeometry
getCoordinates2D, getCoordinates3D, getPoint
Methods inherited from class com.esri.core.geometry.Geometry
_clone, _touch, addAttribute, addID, addM, addZ, assignVertexDescription, copy, dropAllAttributes, dropAttribute, estimateMemorySize, getDescription, getDimensionFromType, getStateFlag, hasAttribute, hasID, hasM, hasZ, isArea, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment, mergeVertexDescription, vertex_count, writeReplace
-
Field Details
-
m_bPolygon
protected boolean m_bPolygon -
m_moveToPoint
-
m_cachedLength2D
protected double m_cachedLength2D -
m_cachedArea2D
protected double m_cachedArea2D -
m_cachedRingAreas2D
-
m_bPathStarted
protected boolean m_bPathStarted -
m_paths
-
m_pathFlags
-
m_segmentFlags
-
m_segmentParamIndex
-
m_segmentParams
-
m_curveParamwritePoint
protected int m_curveParamwritePoint -
m_currentPathIndex
private int m_currentPathIndex -
m_fill_rule
private int m_fill_rule -
_segmentParamSizes
static int[] _segmentParamSizes
-
-
Constructor Details
-
MultiPathImpl
public MultiPathImpl(boolean bPolygon) -
MultiPathImpl
-
-
Method Details
-
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.
-
hasNonLinearSegments
public boolean hasNonLinearSegments() -
_initPathStartPoint
protected void _initPathStartPoint() -
startPath
public void startPath(double x, double y) Starts a new Path at the Point. -
startPath
-
startPath
-
startPath
-
_beforeNewSegment
protected void _beforeNewSegment(int resizeBy) -
_finishLineTo
protected void _finishLineTo() -
lineTo
public void lineTo(double x, double y) adds a Line Segment from the last Point to the given endPoint. -
lineTo
-
lineTo
-
lineTo
-
_initSegmentData
protected void _initSegmentData(int sz) -
_finishBezierTo
protected void _finishBezierTo() -
bezierTo
adds a Cubic Bezier Segment to the current Path. The Bezier Segment connects the current last Point and the given endPoint. -
openPath
public void openPath(int pathIndex) -
openPathAndDuplicateStartVertex
public void openPathAndDuplicateStartVertex(int pathIndex) -
openAllPathsAndDuplicateStartVertex
public void openAllPathsAndDuplicateStartVertex() -
closePathWithLine
void closePathWithLine(int path_index) -
closePathWithLine
void closePathWithLine() -
closeAllPaths
public void closeAllPaths()Closes all open curves by adding an implicit line segment from the end point to the start point. -
getSegmentDataSize
public static int getSegmentDataSize(byte flag) Returns the size of the segment data for the given segment type.- Parameters:
flag
- is one of the segment flags from the SegmentFlags enum.- Returns:
- the size of the segment params as the number of doubles.
-
closePathWithBezier
Closes last path of the MultiPathImpl with the Bezier Segment. The start point of the Bezier is the last point of the path and the last point of the bezier is the first point of the path. -
isClosedPath
public boolean isClosedPath(int ipath) Returns True if the given path is closed (represents a Ring). -
isClosedPathInXYPlane
public boolean isClosedPathInXYPlane(int path_index) -
hasNonLinearSegments
public boolean hasNonLinearSegments(int ipath) Returns True if the given path might have non-linear segments. -
addSegment
-
addEnvelope
adds a rectangular closed Path to the MultiPathImpl.- Parameters:
envSrc
- is the source rectangle.bReverse
- Creates reversed path.
-
addEnvelope
adds a rectangular closed Path to the MultiPathImpl.- Parameters:
envSrc
- is the source rectangle.bReverse
- Creates reversed path.
-
add
-
addPath
-
addPath
-
addSegmentsFromPath
public void addSegmentsFromPath(MultiPathImpl src, int src_path_index, int src_segment_from, int src_segment_count, boolean b_start_new_path) -
reverseAllPaths
public void reverseAllPaths() -
reversePath
public void reversePath(int pathIndex) -
removePath
public void removePath(int pathIndex) -
insertPath
-
insertPath
public void insertPath(int pathIndex, Point2D[] points, int pointsOffset, int count, boolean bForward) -
insertPoints
public void insertPoints(int pathIndex, int beforePointIndex, MultiPathImpl src, int srcPathIndex, int srcPointIndexFrom, int srcPointCount, boolean bForward) -
insertPoints
public void insertPoints(int pathIndex, int beforePointIndex, Point2D[] src, int srcPointIndexFrom, int srcPointCount, boolean bForward) -
insertPoint
-
insertPoint
-
removePoint
public void removePoint(int pathIndex, int pointIndex) -
calculatePathLength2D
public double calculatePathLength2D(int pathIndex) -
calculateSubLength2D
double calculateSubLength2D(int from_path_index, int from_point_index, int to_path_index, int to_point_index) -
calculateSubLength2D
double calculateSubLength2D(int path_index, int from_point_index, int to_point_index) -
getBoundary
Description copied from class:Geometry
Returns boundary of this geometry. Polygon and Envelope boundary is a Polyline. For Polyline and Line, the boundary is a Multi_point consisting of path end points. For Multi_point and Point null is returned.- Specified by:
getBoundary
in classGeometry
- Returns:
- The boundary geometry.
-
interpolateAttributes
void interpolateAttributes(int from_path_index, int from_point_index, int to_path_index, int to_point_index) -
interpolateAttributesForSemantics
void interpolateAttributesForSemantics(int semantics, int from_path_index, int from_point_index, int to_path_index, int to_point_index) -
interpolateAttributes
void interpolateAttributes(int path_index, int from_point_index, int to_point_index) -
interpolateAttributesForSemantics
void interpolateAttributesForSemantics(int semantics, int path_index, int from_point_index, int to_point_index) -
interpolateAttributes_
void interpolateAttributes_(int semantics, int from_path_index, int from_point_index, int to_path_index, int to_point_index, double sub_length, int ordinate) -
interpolateAttributes_
void interpolateAttributes_(int semantics, int path_index, int from_point_index, int to_point_index, double sub_length, int ordinate) -
setEmpty
public void setEmpty()Description copied from class:Geometry
Returns the geometry to its original initialization state by releasing all data referenced by the geometry. -
applyTransformation
Description copied from class:Geometry
Applies 2D affine transformation in XY plane.- Specified by:
applyTransformation
in classGeometry
- Parameters:
transform
- The affine transformation to be applied to this geometry.
-
applyTransformation
-
applyTransformation
Description copied from class:Geometry
Applies 3D affine transformation. Adds Z attribute if it is missing.- Specified by:
applyTransformation
in classGeometry
- Parameters:
transform
- The affine transformation to be applied to this geometry.
-
_verifyStreamsImpl
protected void _verifyStreamsImpl()Description copied from class:MultiVertexGeometryImpl
\internal Called inside of the VerifyAllStreams to get a child class a chance to do additional verify.- Specified by:
_verifyStreamsImpl
in classMultiVertexGeometryImpl
-
_copyToImpl
Description copied from class:MultiVertexGeometryImpl
\internal CHildren implement this method to copy additional information- Specified by:
_copyToImpl
in classMultiVertexGeometryImpl
-
calculateLength2D
public double calculateLength2D()Description copied from class:Geometry
Calculates the length of the geometry. If the spatial reference is a Geographic Coordinate System (a system where coordinates are defined using angular units such as longitude and latitude) then the 2D distance calculation is returned in angular units. In cases where length must be calculated on a Geographic Coordinate System consider the using the geodeticLength method on theGeometryEngine
- Overrides:
calculateLength2D
in classGeometry
- Returns:
- A double value representing the 2D length of the geometry.
-
equals
- Overrides:
equals
in classMultiVertexGeometryImpl
-
querySegmentIteratorAtVertex
Returns a SegmentIterator that set to a specific vertex of the MultiPathImpl. The call to NextSegment will return the segment that starts at the vertex. Call to PreviousSegment will return the segment that starts at the previous vertex. -
querySegmentIterator
-
_updateXYImpl
public void _updateXYImpl(boolean bExact) Description copied from class:MultiVertexGeometryImpl
\internal Updates x, y intervals.- Overrides:
_updateXYImpl
in classMultiVertexGeometryImpl
-
calculateEnvelope2D
- Overrides:
calculateEnvelope2D
in classMultiVertexGeometryImpl
-
_notifyModifiedAllImpl
public void _notifyModifiedAllImpl()- Specified by:
_notifyModifiedAllImpl
in classMultiVertexGeometryImpl
-
calculateArea2D
public double calculateArea2D()Description copied from class:Geometry
Calculates the area of the geometry. If the spatial reference is a Geographic Coordinate System (WGS84) then the 2D area calculation is defined in angular units.- Overrides:
calculateArea2D
in classGeometry
- Returns:
- A double value representing the 2D area of the geometry.
-
isExteriorRing
public boolean isExteriorRing(int ringIndex) Returns True if the ring is an exterior ring. Valid only for simple polygons. -
calculateRingArea2D
public double calculateRingArea2D(int pathIndex) -
_updateRingAreas2D
public void _updateRingAreas2D() -
getOGCPolygonCount
int getOGCPolygonCount() -
_updateOGCFlags
protected void _updateOGCFlags() -
getPathIndexFromPointIndex
public int getPathIndexFromPointIndex(int pointIndex) -
getHighestPointIndex
int getHighestPointIndex(int path_index) -
getSegmentCount
public int getSegmentCount()Returns total segment count in the MultiPathImpl. -
getSegmentCount
public int getSegmentCount(int path_index) -
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. -
isEnvelope
public boolean isEnvelope()Returns True if the class is envelope. THis is not an exact method. Only addEnvelope makes this true. -
getPathStreamRef
Returns a reference to the AttributeStream of MultiPathImpl parts (Paths). For the non empty MultiPathImpl, that stream contains start points of the MultiPathImpl curves. In addition, the last element is the total point count. The number of vertices in a given part is parts[i + 1] - parts[i]. -
setPathStreamRef
sets a reference to an AttributeStream of MultiPathImpl paths (Paths). -
getSegmentFlagsStreamRef
Returns a reference to the AttributeStream of Segment flags (SegmentFlags flags). Can be NULL when no non-linear segments are present. Segment flags indicate what kind of segment originates (starts) on the given point. The last vertices of open Path parts has enumNone flag. -
getPathFlagsStreamRef
Returns a reference to the AttributeStream of Path flags (PathFlags flags). Each start point of a path has a flag set to indicate if the Path is open or closed. -
setPathFlagsStreamRef
sets a reference to an AttributeStream of Path flags (PathFlags flags). -
getSegmentIndexStreamRef
-
getSegmentDataStreamRef
-
getPathCount
public int getPathCount() -
getPathEnd
public int getPathEnd(int partIndex) -
getPathSize
public int getPathSize(int partIndex) -
getPathStart
public int getPathStart(int partIndex) -
_getImpl
-
setDirtyOGCFlags
public void setDirtyOGCFlags(boolean bYesNo) -
hasDirtyOGCStartFlags
public boolean hasDirtyOGCStartFlags() -
setDirtyRingAreas2D
public void setDirtyRingAreas2D(boolean bYesNo) -
hasDirtyRingAreas2D
public boolean hasDirtyRingAreas2D() -
setRingAreasStreamRef
-
_buildRasterizedGeometryAccelerator
public boolean _buildRasterizedGeometryAccelerator(double toleranceXY, Geometry.GeometryAccelerationDegree accelDegree) - Specified by:
_buildRasterizedGeometryAccelerator
in classMultiVertexGeometryImpl
-
hashCode
public int hashCode()- Overrides:
hashCode
in classMultiVertexGeometryImpl
-
getSegmentFlags
public byte getSegmentFlags(int ivertex) -
getSegment
-
queryPathEnvelope2D
-
queryLoosePathEnvelope2D
-
_buildQuadTreeAccelerator
- Specified by:
_buildQuadTreeAccelerator
in classMultiVertexGeometryImpl
-
_buildQuadTreeForPathsAccelerator
-
setFillRule
void setFillRule(int rule) -
getFillRule
int getFillRule() -
clearDirtyOGCFlags
void clearDirtyOGCFlags()
-