Class MultiPathImpl

All Implemented Interfaces:
Serializable

final class MultiPathImpl extends MultiVertexGeometryImpl
  • Field Details

    • m_bPolygon

      protected boolean m_bPolygon
    • m_moveToPoint

      protected Point m_moveToPoint
    • m_cachedLength2D

      protected double m_cachedLength2D
    • m_cachedArea2D

      protected double m_cachedArea2D
    • m_cachedRingAreas2D

      protected AttributeStreamOfDbl m_cachedRingAreas2D
    • m_bPathStarted

      protected boolean m_bPathStarted
    • m_paths

      protected AttributeStreamOfInt32 m_paths
    • m_pathFlags

      protected AttributeStreamOfInt8 m_pathFlags
    • m_segmentFlags

      protected AttributeStreamOfInt8 m_segmentFlags
    • m_segmentParamIndex

      protected AttributeStreamOfInt32 m_segmentParamIndex
    • m_segmentParams

      protected AttributeStreamOfDbl 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

      public MultiPathImpl(boolean bPolygon, VertexDescription description)
  • 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 of VertexDescription are shared among geometry objects.

      Specified by:
      estimateMemorySize in class Geometry
      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

      public void startPath(Point2D point)
    • startPath

      public void startPath(Point3D point)
    • startPath

      public void startPath(Point point)
    • _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

      public void lineTo(Point2D endPoint)
    • lineTo

      public void lineTo(Point3D endPoint)
    • lineTo

      public void lineTo(Point endPoint)
    • _initSegmentData

      protected void _initSegmentData(int sz)
    • _finishBezierTo

      protected void _finishBezierTo()
    • bezierTo

      public void bezierTo(Point2D controlPoint1, Point2D controlPoint2, Point2D endPoint)
      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

      public void closePathWithBezier(Point2D controlPoint1, Point2D controlPoint2)
      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

      public void addSegment(Segment segment, boolean bStartNewPath)
    • addEnvelope

      public void addEnvelope(Envelope2D envSrc, boolean bReverse)
      adds a rectangular closed Path to the MultiPathImpl.
      Parameters:
      envSrc - is the source rectangle.
      bReverse - Creates reversed path.
    • addEnvelope

      public void addEnvelope(Envelope envSrc, boolean bReverse)
      adds a rectangular closed Path to the MultiPathImpl.
      Parameters:
      envSrc - is the source rectangle.
      bReverse - Creates reversed path.
    • add

      public void add(MultiPathImpl src, boolean bReversePaths)
    • addPath

      public void addPath(MultiPathImpl src, int srcPathIndex, boolean bForward)
    • addPath

      public void addPath(Point2D[] _points, int count, boolean bForward)
    • 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

      public void insertPath(int pathIndex, MultiPathImpl src, int srcPathIndex, boolean bForward)
    • 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

      public void insertPoint(int pathIndex, int beforePointIndex, Point2D pt)
    • insertPoint

      public void insertPoint(int pathIndex, int beforePointIndex, Point pt)
    • 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

      public Geometry 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 class Geometry
      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.
      Specified by:
      setEmpty in class Geometry
    • applyTransformation

      public void applyTransformation(Transformation2D transform)
      Description copied from class: Geometry
      Applies 2D affine transformation in XY plane.
      Specified by:
      applyTransformation in class Geometry
      Parameters:
      transform - The affine transformation to be applied to this geometry.
    • applyTransformation

      public void applyTransformation(Transformation2D transform, int pathIndex)
    • applyTransformation

      public void applyTransformation(Transformation3D transform)
      Description copied from class: Geometry
      Applies 3D affine transformation. Adds Z attribute if it is missing.
      Specified by:
      applyTransformation in class Geometry
      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 class MultiVertexGeometryImpl
    • _copyToImpl

      void _copyToImpl(MultiVertexGeometryImpl dst)
      Description copied from class: MultiVertexGeometryImpl
      \internal CHildren implement this method to copy additional information
      Specified by:
      _copyToImpl in class MultiVertexGeometryImpl
    • 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 the GeometryEngine
      Overrides:
      calculateLength2D in class Geometry
      Returns:
      A double value representing the 2D length of the geometry.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class MultiVertexGeometryImpl
    • querySegmentIteratorAtVertex

      public SegmentIteratorImpl querySegmentIteratorAtVertex(int startVertexIndex)
      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

      public SegmentIteratorImpl querySegmentIterator()
    • _updateXYImpl

      public void _updateXYImpl(boolean bExact)
      Description copied from class: MultiVertexGeometryImpl
      \internal Updates x, y intervals.
      Overrides:
      _updateXYImpl in class MultiVertexGeometryImpl
    • calculateEnvelope2D

      void calculateEnvelope2D(Envelope2D env, boolean bExact)
      Overrides:
      calculateEnvelope2D in class MultiVertexGeometryImpl
    • _notifyModifiedAllImpl

      public void _notifyModifiedAllImpl()
      Specified by:
      _notifyModifiedAllImpl in class MultiVertexGeometryImpl
    • 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 class Geometry
      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

      public Geometry createInstance()
      Description copied from class: Geometry
      Creates an instance of an empty geometry of the same type.
      Specified by:
      createInstance in class Geometry
      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 class Geometry
      Returns:
      Returns the integer value of the dimension of geometry.
    • getType

      public Geometry.Type getType()
      Description copied from class: Geometry
      Returns the geometry type.
      Specified by:
      getType in class Geometry
      Returns:
      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

      public AttributeStreamOfInt32 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

      public void setPathStreamRef(AttributeStreamOfInt32 paths)
      sets a reference to an AttributeStream of MultiPathImpl paths (Paths).
    • getSegmentFlagsStreamRef

      public AttributeStreamOfInt8 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

      public AttributeStreamOfInt8 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

      public void setPathFlagsStreamRef(AttributeStreamOfInt8 pathFlags)
      sets a reference to an AttributeStream of Path flags (PathFlags flags).
    • getSegmentIndexStreamRef

      public AttributeStreamOfInt32 getSegmentIndexStreamRef()
    • getSegmentDataStreamRef

      public AttributeStreamOfDbl getSegmentDataStreamRef()
    • getPathCount

      public int getPathCount()
    • getPathEnd

      public int getPathEnd(int partIndex)
    • getPathSize

      public int getPathSize(int partIndex)
    • getPathStart

      public int getPathStart(int partIndex)
    • _getImpl

      public Object _getImpl()
      Overrides:
      _getImpl in class Geometry
    • setDirtyOGCFlags

      public void setDirtyOGCFlags(boolean bYesNo)
    • hasDirtyOGCStartFlags

      public boolean hasDirtyOGCStartFlags()
    • setDirtyRingAreas2D

      public void setDirtyRingAreas2D(boolean bYesNo)
    • hasDirtyRingAreas2D

      public boolean hasDirtyRingAreas2D()
    • setRingAreasStreamRef

      public void setRingAreasStreamRef(AttributeStreamOfDbl ringAreas)
    • _buildRasterizedGeometryAccelerator

      public boolean _buildRasterizedGeometryAccelerator(double toleranceXY, Geometry.GeometryAccelerationDegree accelDegree)
      Specified by:
      _buildRasterizedGeometryAccelerator in class MultiVertexGeometryImpl
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class MultiVertexGeometryImpl
    • getSegmentFlags

      public byte getSegmentFlags(int ivertex)
    • getSegment

      public void getSegment(int startVertexIndex, SegmentBuffer segBuffer, boolean bStripAttributes)
    • queryPathEnvelope2D

      void queryPathEnvelope2D(int path_index, Envelope2D envelope)
    • queryLoosePathEnvelope2D

      public void queryLoosePathEnvelope2D(int path_index, Envelope2D envelope)
    • _buildQuadTreeAccelerator

      public boolean _buildQuadTreeAccelerator(Geometry.GeometryAccelerationDegree d)
      Specified by:
      _buildQuadTreeAccelerator in class MultiVertexGeometryImpl
    • _buildQuadTreeForPathsAccelerator

      boolean _buildQuadTreeForPathsAccelerator(Geometry.GeometryAccelerationDegree degree)
    • setFillRule

      void setFillRule(int rule)
    • getFillRule

      int getFillRule()
    • clearDirtyOGCFlags

      void clearDirtyOGCFlags()