Class CompoundCurve

  • All Implemented Interfaces:
    Serializable, Cloneable, Comparable, CompoundCurvedGeometry<LineString>, CurvedGeometry<LineString>, Lineal

    public class CompoundCurve
    extends LineString
    implements CompoundCurvedGeometry<LineString>
    A CompoundCurve is a connected sequence of circular arcs and linear segments.
    Author:
    Andrea Aime - GeoSolutions
    See Also:
    Serialized Form
    • Constructor Detail

      • CompoundCurve

        public CompoundCurve​(List<LineString> components,
                             GeometryFactory factory,
                             double tolerance)
    • Method Detail

      • getCoordinatesDimension

        public int getCoordinatesDimension()
        Description copied from interface: CurvedGeometry
        Returns the dimension of the geometry without forcing access to the coordinate sequence
        Specified by:
        getCoordinatesDimension in interface CurvedGeometry<LineString>
      • linearize

        public LineString linearize()
        Description copied from interface: CurvedGeometry
        Linearizes the geometry using the built-in linearization tolerance
        Specified by:
        linearize in interface CurvedGeometry<LineString>
      • linearize

        public LineString linearize​(double tolerance)
        Description copied from interface: CurvedGeometry
        Linearizes the geometry using the provided tolerance, the result is guaranteed to be less than tolerance away from the curved geometry unless the number of points needed to linearize the geometry exceeds the build-in per quadrant maximum, see CircularArc.MAX_SEGMENTS_QUADRANT
        Specified by:
        linearize in interface CurvedGeometry<LineString>
        Parameters:
        tolerance - Linearization tolerance, should be zero or positive. When zero is used, the maximum number of allowed linearization points will be used, see CircularArc.MAX_SEGMENTS_QUADRANT
      • getLinearizedCoordinateSequence

        protected CoordinateSequence getLinearizedCoordinateSequence​(double tolerance)
      • getTolerance

        public double getTolerance()
        Description copied from interface: CurvedGeometry
        The default linearization tolerance
        Specified by:
        getTolerance in interface CurvedGeometry<LineString>
      • getComponents

        public List<LineString> getComponents()
        Returns the components of this compound curve, which will be a list of straight LineString objects and CircularString/CircularRing
        Specified by:
        getComponents in interface CompoundCurvedGeometry<LineString>
      • isClosed

        public boolean isClosed()
        Overrides:
        isClosed in class LineString
      • getDimension

        public int getDimension()
        Overrides:
        getDimension in class LineString
      • getBoundaryDimension

        public int getBoundaryDimension()
        Overrides:
        getBoundaryDimension in class LineString
      • isEmpty

        public boolean isEmpty()
        Overrides:
        isEmpty in class LineString
      • getGeometryType

        public String getGeometryType()
        Overrides:
        getGeometryType in class LineString
      • reverse

        public CompoundCurve reverse()
        Overrides:
        reverse in class LineString
      • reverseInternal

        public CompoundCurve reverseInternal()
        Overrides:
        reverseInternal in class LineString
      • getInteriorPoint

        public Point getInteriorPoint()
        Overrides:
        getInteriorPoint in class Geometry
      • getEnvelope

        public Geometry getEnvelope()
        Overrides:
        getEnvelope in class Geometry
      • getEnvelopeInternal

        public Envelope getEnvelopeInternal()
        Overrides:
        getEnvelopeInternal in class Geometry
      • computeEnvelopeInternal

        protected Envelope computeEnvelopeInternal()
        Overrides:
        computeEnvelopeInternal in class LineString
      • getNumGeometries

        public int getNumGeometries()
        Overrides:
        getNumGeometries in class Geometry
      • getGeometryN

        public Geometry getGeometryN​(int n)
        Overrides:
        getGeometryN in class Geometry
      • setUserData

        public void setUserData​(Object userData)
        Overrides:
        setUserData in class Geometry
      • getSRID

        public int getSRID()
        Overrides:
        getSRID in class Geometry
      • setSRID

        public void setSRID​(int SRID)
        Overrides:
        setSRID in class Geometry
      • getFactory

        public GeometryFactory getFactory()
        Overrides:
        getFactory in class Geometry
      • getUserData

        public Object getUserData()
        Overrides:
        getUserData in class Geometry
      • getPrecisionModel

        public PrecisionModel getPrecisionModel()
        Overrides:
        getPrecisionModel in class Geometry
      • equalsExact

        public boolean equalsExact​(Geometry other)
        Overrides:
        equalsExact in class Geometry
      • equalsExact

        public boolean equalsExact​(Geometry other,
                                   double tolerance)
        Overrides:
        equalsExact in class LineString
      • equals

        public boolean equals​(Geometry other)
        Overrides:
        equals in class Geometry
      • equalsTopo

        public boolean equalsTopo​(Geometry other)
        Overrides:
        equalsTopo in class Geometry
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class Geometry
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Geometry
      • toString

        public String toString()
        Overrides:
        toString in class Geometry
      • toCurvedText

        public String toCurvedText()
        Description copied from interface: CurvedGeometry
        Parallel method to Geometry.toText() that will output the geometry as curved instead of as linear
        Specified by:
        toCurvedText in interface CurvedGeometry<LineString>
      • equalsNorm

        public boolean equalsNorm​(Geometry g)
        Overrides:
        equalsNorm in class Geometry
      • isRectangle

        public boolean isRectangle()
        Overrides:
        isRectangle in class Geometry
      • getCoordinates

        public Coordinate[] getCoordinates()
        Overrides:
        getCoordinates in class LineString
      • getCoordinateSequence

        public CoordinateSequence getCoordinateSequence()
        Overrides:
        getCoordinateSequence in class LineString
      • getCoordinateN

        public Coordinate getCoordinateN​(int n)
        Overrides:
        getCoordinateN in class LineString
      • getCoordinate

        public Coordinate getCoordinate()
        Overrides:
        getCoordinate in class LineString
      • getNumPoints

        public int getNumPoints()
        Overrides:
        getNumPoints in class LineString
      • getPointN

        public Point getPointN​(int n)
        Overrides:
        getPointN in class LineString
      • getStartPoint

        public Point getStartPoint()
        Overrides:
        getStartPoint in class LineString
      • getEndPoint

        public Point getEndPoint()
        Overrides:
        getEndPoint in class LineString
      • isRing

        public boolean isRing()
        Overrides:
        isRing in class LineString
      • getLength

        public double getLength()
        Overrides:
        getLength in class LineString
      • getBoundary

        public Geometry getBoundary()
        Overrides:
        getBoundary in class LineString
      • isCoordinate

        public boolean isCoordinate​(Coordinate pt)
        Overrides:
        isCoordinate in class LineString
      • apply

        public void apply​(CoordinateFilter filter)
        Overrides:
        apply in class LineString
      • apply

        public void apply​(CoordinateSequenceFilter filter)
        Overrides:
        apply in class LineString
      • apply

        public void apply​(GeometryFilter filter)
        Overrides:
        apply in class LineString
      • apply

        public void apply​(GeometryComponentFilter filter)
        Overrides:
        apply in class LineString
      • copyInternal

        public CompoundCurve copyInternal()
        Overrides:
        copyInternal in class LineString
      • normalize

        public void normalize()
        Overrides:
        normalize in class LineString
      • isSimple

        public boolean isSimple()
        Overrides:
        isSimple in class Geometry
      • isValid

        public boolean isValid()
        Overrides:
        isValid in class Geometry
      • distance

        public double distance​(Geometry g)
        Overrides:
        distance in class Geometry
      • isWithinDistance

        public boolean isWithinDistance​(Geometry geom,
                                        double distance)
        Overrides:
        isWithinDistance in class Geometry
      • getArea

        public double getArea()
        Overrides:
        getArea in class Geometry
      • getCentroid

        public Point getCentroid()
        Overrides:
        getCentroid in class Geometry
      • geometryChanged

        public void geometryChanged()
        Overrides:
        geometryChanged in class Geometry
      • disjoint

        public boolean disjoint​(Geometry g)
        Overrides:
        disjoint in class Geometry
      • touches

        public boolean touches​(Geometry g)
        Overrides:
        touches in class Geometry
      • intersects

        public boolean intersects​(Geometry g)
        Overrides:
        intersects in class Geometry
      • crosses

        public boolean crosses​(Geometry g)
        Overrides:
        crosses in class Geometry
      • within

        public boolean within​(Geometry g)
        Overrides:
        within in class Geometry
      • contains

        public boolean contains​(Geometry g)
        Overrides:
        contains in class Geometry
      • overlaps

        public boolean overlaps​(Geometry g)
        Overrides:
        overlaps in class Geometry
      • covers

        public boolean covers​(Geometry g)
        Overrides:
        covers in class Geometry
      • coveredBy

        public boolean coveredBy​(Geometry g)
        Overrides:
        coveredBy in class Geometry
      • relate

        public boolean relate​(Geometry g,
                              String intersectionPattern)
        Overrides:
        relate in class Geometry
      • relate

        public IntersectionMatrix relate​(Geometry g)
        Overrides:
        relate in class Geometry
      • buffer

        public Geometry buffer​(double distance)
        Overrides:
        buffer in class Geometry
      • buffer

        public Geometry buffer​(double distance,
                               int quadrantSegments)
        Overrides:
        buffer in class Geometry
      • buffer

        public Geometry buffer​(double distance,
                               int quadrantSegments,
                               int endCapStyle)
        Overrides:
        buffer in class Geometry
      • convexHull

        public Geometry convexHull()
        Overrides:
        convexHull in class Geometry
      • intersection

        public Geometry intersection​(Geometry other)
        Overrides:
        intersection in class Geometry
      • union

        public Geometry union​(Geometry other)
        Overrides:
        union in class Geometry
      • difference

        public Geometry difference​(Geometry other)
        Overrides:
        difference in class Geometry
      • symDifference

        public Geometry symDifference​(Geometry other)
        Overrides:
        symDifference in class Geometry
      • union

        public Geometry union()
        Overrides:
        union in class Geometry
      • norm

        public Geometry norm()
        Overrides:
        norm in class Geometry
      • compareTo

        public int compareTo​(Object o)
        Specified by:
        compareTo in interface Comparable
        Overrides:
        compareTo in class Geometry
      • compareTo

        public int compareTo​(Object o,
                             CoordinateSequenceComparator comp)
        Overrides:
        compareTo in class Geometry
      • toText

        public String toText()
        Overrides:
        toText in class Geometry