Package org.geotools.geometry.jts
Class CompoundRing
- Object
-
- Geometry
-
- LineString
-
- LinearRing
-
- CompoundRing
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable,CompoundCurvedGeometry<LinearRing>,CurvedGeometry<LinearRing>,CurvedRing,Lineal
public class CompoundRing extends LinearRing implements CompoundCurvedGeometry<LinearRing>, CurvedRing
A CompoundRing is a connected sequence of circular arcs and linear segments forming a closed line.- Author:
- Andrea Aime - GeoSolutions
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class LinearRing
MINIMUM_VALID_SIZE
-
Fields inherited from class LineString
points
-
Fields inherited from class Geometry
envelope, factory, SRID, TYPECODE_GEOMETRYCOLLECTION, TYPECODE_LINEARRING, TYPECODE_LINESTRING, TYPECODE_MULTILINESTRING, TYPECODE_MULTIPOINT, TYPECODE_MULTIPOLYGON, TYPECODE_POINT, TYPECODE_POLYGON, TYPENAME_GEOMETRYCOLLECTION, TYPENAME_LINEARRING, TYPENAME_LINESTRING, TYPENAME_MULTILINESTRING, TYPENAME_MULTIPOINT, TYPENAME_MULTIPOLYGON, TYPENAME_POINT, TYPENAME_POLYGON
-
-
Constructor Summary
Constructors Constructor Description CompoundRing(List<LineString> components, GeometryFactory factory, double tolerance)CompoundRing(CompoundCurve delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(CoordinateFilter filter)voidapply(CoordinateSequenceFilter filter)voidapply(GeometryComponentFilter filter)voidapply(GeometryFilter filter)Geometrybuffer(double distance)Geometrybuffer(double distance, int quadrantSegments)Geometrybuffer(double distance, int quadrantSegments, int endCapStyle)intcompareTo(Object o)intcompareTo(Object o, CoordinateSequenceComparator comp)protected EnvelopecomputeEnvelopeInternal()booleancontains(Geometry g)GeometryconvexHull()CompoundRingcopyInternal()booleancoveredBy(Geometry g)booleancovers(Geometry g)booleancrosses(Geometry g)Geometrydifference(Geometry other)booleandisjoint(Geometry g)doubledistance(Geometry g)booleanequals(Object o)booleanequals(Geometry other)booleanequalsExact(Geometry other)booleanequalsExact(Geometry other, double tolerance)booleanequalsNorm(Geometry g)booleanequalsTopo(Geometry other)voidgeometryChanged()doublegetArea()GeometrygetBoundary()intgetBoundaryDimension()PointgetCentroid()List<LineString>getComponents()Returns the components of this compound curve, which will be a list of straight LineString objects and CircularString/CircularRingCoordinategetCoordinate()CoordinategetCoordinateN(int n)Coordinate[]getCoordinates()intgetCoordinatesDimension()Returns the dimension of the geometry without forcing access to the coordinate sequenceCoordinateSequencegetCoordinateSequence()intgetDimension()PointgetEndPoint()GeometrygetEnvelope()EnvelopegetEnvelopeInternal()GeometryFactorygetFactory()GeometrygetGeometryN(int n)StringgetGeometryType()PointgetInteriorPoint()doublegetLength()intgetNumGeometries()intgetNumPoints()PointgetPointN(int n)PrecisionModelgetPrecisionModel()intgetSRID()PointgetStartPoint()doublegetTolerance()The default linearization toleranceObjectgetUserData()inthashCode()Geometryintersection(Geometry other)booleanintersects(Geometry g)booleanisClosed()booleanisCoordinate(Coordinate pt)booleanisEmpty()booleanisRectangle()booleanisRing()booleanisSimple()booleanisValid()booleanisWithinDistance(Geometry geom, double distance)LinearRinglinearize()Linearizes the geometry using the built-in linearization toleranceLinearRinglinearize(double tolerance)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, seeCircularArc.MAX_SEGMENTS_QUADRANTGeometrynorm()voidnormalize()booleanoverlaps(Geometry g)IntersectionMatrixrelate(Geometry g)booleanrelate(Geometry g, String intersectionPattern)CompoundRingreverse()CompoundRingreverseInternal()voidsetSRID(int SRID)voidsetUserData(Object userData)GeometrysymDifference(Geometry other)StringtoCurvedText()Parallel method toGeometry.toText()that will output the geometry as curved instead of as linearStringtoString()StringtoText()booleantouches(Geometry g)Geometryunion()Geometryunion(Geometry other)booleanwithin(Geometry g)-
Methods inherited from class LinearRing
getTypeCode
-
Methods inherited from class LineString
clone, compareToSameClass, compareToSameClass, isEquivalentClass
-
Methods inherited from class Geometry
compare, copy, equal, geometryChangedAction, hasDimension, hasNonEmptyElements, hasNullElements, isGeometryCollection
-
-
-
-
Constructor Detail
-
CompoundRing
public CompoundRing(List<LineString> components, GeometryFactory factory, double tolerance)
-
CompoundRing
public CompoundRing(CompoundCurve delegate)
-
-
Method Detail
-
getTolerance
public double getTolerance()
Description copied from interface:CurvedGeometryThe default linearization tolerance- Specified by:
getTolerancein interfaceCurvedGeometry<LinearRing>
-
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:
getComponentsin interfaceCompoundCurvedGeometry<LinearRing>
-
getCoordinatesDimension
public int getCoordinatesDimension()
Description copied from interface:CurvedGeometryReturns the dimension of the geometry without forcing access to the coordinate sequence- Specified by:
getCoordinatesDimensionin interfaceCurvedGeometry<LinearRing>
-
linearize
public LinearRing linearize()
Description copied from interface:CurvedGeometryLinearizes the geometry using the built-in linearization tolerance- Specified by:
linearizein interfaceCurvedGeometry<LinearRing>
-
linearize
public LinearRing linearize(double tolerance)
Description copied from interface:CurvedGeometryLinearizes 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, seeCircularArc.MAX_SEGMENTS_QUADRANT- Specified by:
linearizein interfaceCurvedGeometry<LinearRing>- Parameters:
tolerance- Linearization tolerance, should be zero or positive. When zero is used, the maximum number of allowed linearization points will be used, seeCircularArc.MAX_SEGMENTS_QUADRANT
-
isClosed
public boolean isClosed()
- Overrides:
isClosedin classLinearRing
-
getDimension
public int getDimension()
- Overrides:
getDimensionin classLineString
-
getBoundaryDimension
public int getBoundaryDimension()
- Overrides:
getBoundaryDimensionin classLinearRing
-
isEmpty
public boolean isEmpty()
- Overrides:
isEmptyin classLineString
-
getGeometryType
public String getGeometryType()
- Overrides:
getGeometryTypein classLinearRing
-
reverse
public CompoundRing reverse()
- Overrides:
reversein classLinearRing
-
reverseInternal
public CompoundRing reverseInternal()
- Overrides:
reverseInternalin classLinearRing
-
getNumGeometries
public int getNumGeometries()
- Overrides:
getNumGeometriesin classGeometry
-
getGeometryN
public Geometry getGeometryN(int n)
- Overrides:
getGeometryNin classGeometry
-
setUserData
public void setUserData(Object userData)
- Overrides:
setUserDatain classGeometry
-
getFactory
public GeometryFactory getFactory()
- Overrides:
getFactoryin classGeometry
-
getUserData
public Object getUserData()
- Overrides:
getUserDatain classGeometry
-
getPrecisionModel
public PrecisionModel getPrecisionModel()
- Overrides:
getPrecisionModelin classGeometry
-
isRectangle
public boolean isRectangle()
- Overrides:
isRectanglein classGeometry
-
getInteriorPoint
public Point getInteriorPoint()
- Overrides:
getInteriorPointin classGeometry
-
getEnvelope
public Geometry getEnvelope()
- Overrides:
getEnvelopein classGeometry
-
getEnvelopeInternal
public Envelope getEnvelopeInternal()
- Overrides:
getEnvelopeInternalin classGeometry
-
computeEnvelopeInternal
protected Envelope computeEnvelopeInternal()
- Overrides:
computeEnvelopeInternalin classLineString
-
equalsExact
public boolean equalsExact(Geometry other)
- Overrides:
equalsExactin classGeometry
-
equalsExact
public boolean equalsExact(Geometry other, double tolerance)
- Overrides:
equalsExactin classLineString
-
equalsTopo
public boolean equalsTopo(Geometry other)
- Overrides:
equalsTopoin classGeometry
-
toCurvedText
public String toCurvedText()
Description copied from interface:CurvedGeometryParallel method toGeometry.toText()that will output the geometry as curved instead of as linear- Specified by:
toCurvedTextin interfaceCurvedGeometry<LinearRing>
-
equalsNorm
public boolean equalsNorm(Geometry g)
- Overrides:
equalsNormin classGeometry
-
getPointN
public Point getPointN(int n)
- Overrides:
getPointNin classLineString
-
getStartPoint
public Point getStartPoint()
- Overrides:
getStartPointin classLineString
-
getEndPoint
public Point getEndPoint()
- Overrides:
getEndPointin classLineString
-
getCoordinates
public Coordinate[] getCoordinates()
- Overrides:
getCoordinatesin classLineString
-
getCoordinateSequence
public CoordinateSequence getCoordinateSequence()
- Overrides:
getCoordinateSequencein classLineString
-
getCoordinateN
public Coordinate getCoordinateN(int n)
- Overrides:
getCoordinateNin classLineString
-
getCoordinate
public Coordinate getCoordinate()
- Overrides:
getCoordinatein classLineString
-
getNumPoints
public int getNumPoints()
- Overrides:
getNumPointsin classLineString
-
isRing
public boolean isRing()
- Overrides:
isRingin classLineString
-
getLength
public double getLength()
- Overrides:
getLengthin classLineString
-
getBoundary
public Geometry getBoundary()
- Overrides:
getBoundaryin classLineString
-
isCoordinate
public boolean isCoordinate(Coordinate pt)
- Overrides:
isCoordinatein classLineString
-
apply
public void apply(CoordinateFilter filter)
- Overrides:
applyin classLineString
-
apply
public void apply(CoordinateSequenceFilter filter)
- Overrides:
applyin classLineString
-
apply
public void apply(GeometryFilter filter)
- Overrides:
applyin classLineString
-
apply
public void apply(GeometryComponentFilter filter)
- Overrides:
applyin classLineString
-
copyInternal
public CompoundRing copyInternal()
- Overrides:
copyInternalin classLinearRing
-
normalize
public void normalize()
- Overrides:
normalizein classLineString
-
isWithinDistance
public boolean isWithinDistance(Geometry geom, double distance)
- Overrides:
isWithinDistancein classGeometry
-
getCentroid
public Point getCentroid()
- Overrides:
getCentroidin classGeometry
-
geometryChanged
public void geometryChanged()
- Overrides:
geometryChangedin classGeometry
-
intersects
public boolean intersects(Geometry g)
- Overrides:
intersectsin classGeometry
-
relate
public IntersectionMatrix relate(Geometry g)
-
buffer
public Geometry buffer(double distance, int quadrantSegments)
-
buffer
public Geometry buffer(double distance, int quadrantSegments, int endCapStyle)
-
convexHull
public Geometry convexHull()
- Overrides:
convexHullin classGeometry
-
intersection
public Geometry intersection(Geometry other)
- Overrides:
intersectionin classGeometry
-
difference
public Geometry difference(Geometry other)
- Overrides:
differencein classGeometry
-
symDifference
public Geometry symDifference(Geometry other)
- Overrides:
symDifferencein classGeometry
-
compareTo
public int compareTo(Object o)
- Specified by:
compareToin interfaceComparable- Overrides:
compareToin classGeometry
-
compareTo
public int compareTo(Object o, CoordinateSequenceComparator comp)
-
-