Package org.geotools.geometry.jts
Class CircularRing
Object
Geometry
LineString
LinearRing
CircularRing
- All Implemented Interfaces:
Serializable,Cloneable,Comparable,CurvedGeometry<LinearRing>,CurvedRing,SingleCurvedGeometry<LinearRing>,Lineal
public class CircularRing
extends LinearRing
implements SingleCurvedGeometry<LinearRing>, CurvedRing
A CircularRing is a CircularString whose start and end point coincide. The ring needs to be formed of at least two
arc circles, in order to be able to determine its orientation.
- Author:
- Andrea Aime - GeoSolutions
- See Also:
-
Field Summary
Fields inherited from class LinearRing
MINIMUM_VALID_SIZEFields inherited from class LineString
pointsFields 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
ConstructorsConstructorDescriptionCircularRing(double[] controlPoints, GeometryFactory factory, double tolerance) CircularRing(CoordinateSequence points, GeometryFactory factory, double tolerance) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(CoordinateFilter filter) voidapply(CoordinateSequenceFilter filter) voidapply(GeometryComponentFilter filter) voidapply(GeometryFilter filter) buffer(double distance) buffer(double distance, int quadrantSegments) buffer(double distance, int quadrantSegments, int endCapStyle) intintcompareTo(Object o, CoordinateSequenceComparator comp) protected Envelopebooleanbooleanbooleanbooleandifference(Geometry other) booleandoublebooleanbooleanbooleanequalsExact(Geometry other) booleanequalsExact(Geometry other, double tolerance) booleanbooleanequalsTopo(Geometry other) voidgetArcN(int arcIndex) Returns the n-th circular arc making up the geometrydoublegetArea()intdouble[]Returns the control points for this string/ring.getCoordinateN(int n) intReturns the dimension of the geometry without forcing access to the coordinate sequenceintgetGeometryN(int n) doublegetLinearizedCoordinateSequence(double tolerance) Returns the linearized coordinates at the given toleranceintNumber of arc circlesintintgetPointN(int n) intgetSRID()doubleThe default linearization toleranceinthashCode()intersection(Geometry other) booleanbooleanisClosed()booleanbooleanisEmpty()booleanbooleanisRing()booleanisSimple()booleanisValid()booleanisWithinDistance(Geometry geom, double distance) Linearizes the geometry using the built-in linearization tolerancelinearize(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_QUADRANTnorm()voidReturns a normalized ring (one that does not have a single arc closing on itself)booleanbooleanreverse()voidsetSRID(int SRID) voidsetUserData(Object userData) symDifference(Geometry other) Parallel method toGeometry.toText()that will output the geometry as curved instead of as lineartoString()toText()booleanunion()booleanMethods inherited from class LinearRing
getTypeCodeMethods inherited from class LineString
clone, compareToSameClass, compareToSameClass, isEquivalentClassMethods inherited from class Geometry
compare, copy, equal, geometryChangedAction, hasDimension, hasNonEmptyElements, hasNullElements, isGeometryCollection
-
Constructor Details
-
CircularRing
-
CircularRing
-
-
Method Details
-
getNumArcs
public int getNumArcs()Description copied from interface:SingleCurvedGeometryNumber of arc circles- Specified by:
getNumArcsin interfaceSingleCurvedGeometry<LinearRing>
-
getArcN
Description copied from interface:SingleCurvedGeometryReturns the n-th circular arc making up the geometry- Specified by:
getArcNin interfaceSingleCurvedGeometry<LinearRing>
-
linearize
Description copied from interface:CurvedGeometryLinearizes the geometry using the built-in linearization tolerance- Specified by:
linearizein interfaceCurvedGeometry<LinearRing>
-
linearize
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
-
getTolerance
public double getTolerance()Description copied from interface:CurvedGeometryThe default linearization tolerance- Specified by:
getTolerancein interfaceCurvedGeometry<LinearRing>
-
getLinearizedCoordinateSequence
Description copied from interface:SingleCurvedGeometryReturns the linearized coordinates at the given tolerance- Specified by:
getLinearizedCoordinateSequencein interfaceSingleCurvedGeometry<LinearRing>
-
getControlPoints
public double[] getControlPoints()Description copied from interface:SingleCurvedGeometryReturns the control points for this string/ring.- Specified by:
getControlPointsin interfaceSingleCurvedGeometry<LinearRing>
-
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
- Overrides:
getGeometryTypein classLinearRing
-
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>
-
normalizeRing
Returns a normalized ring (one that does not have a single arc closing on itself) -
reverse
- Overrides:
reversein classLinearRing
-
reverseInternal
- Overrides:
reverseInternalin classLinearRing
-
getNumGeometries
public int getNumGeometries()- Overrides:
getNumGeometriesin classGeometry
-
getGeometryN
- Overrides:
getGeometryNin classGeometry
-
setUserData
- Overrides:
setUserDatain classGeometry
-
getSRID
public int getSRID() -
setSRID
public void setSRID(int SRID) -
getFactory
- Overrides:
getFactoryin classGeometry
-
getUserData
- Overrides:
getUserDatain classGeometry
-
getPrecisionModel
- Overrides:
getPrecisionModelin classGeometry
-
isRectangle
public boolean isRectangle()- Overrides:
isRectanglein classGeometry
-
getInteriorPoint
- Overrides:
getInteriorPointin classGeometry
-
getEnvelope
- Overrides:
getEnvelopein classGeometry
-
getEnvelopeInternal
- Overrides:
getEnvelopeInternalin classGeometry
-
computeEnvelopeInternal
- Overrides:
computeEnvelopeInternalin classLineString
-
equalsExact
- Overrides:
equalsExactin classGeometry
-
equalsExact
- Overrides:
equalsExactin classLineString
-
equals
-
equalsTopo
- Overrides:
equalsTopoin classGeometry
-
equals
-
hashCode
public int hashCode() -
toString
-
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
- Overrides:
equalsNormin classGeometry
-
getCoordinates
- Overrides:
getCoordinatesin classLineString
-
getCoordinateSequence
- Overrides:
getCoordinateSequencein classLineString
-
getCoordinateN
- Overrides:
getCoordinateNin classLineString
-
getCoordinate
- Overrides:
getCoordinatein classLineString
-
getNumPoints
public int getNumPoints()- Overrides:
getNumPointsin classLineString
-
getPointN
- Overrides:
getPointNin classLineString
-
getStartPoint
- Overrides:
getStartPointin classLineString
-
getEndPoint
- Overrides:
getEndPointin classLineString
-
isRing
public boolean isRing()- Overrides:
isRingin classLineString
-
getLength
public double getLength()- Overrides:
getLengthin classLineString
-
getBoundary
- Overrides:
getBoundaryin classLineString
-
isCoordinate
- Overrides:
isCoordinatein classLineString
-
apply
- Overrides:
applyin classLineString
-
apply
- Overrides:
applyin classLineString
-
apply
- Overrides:
applyin classLineString
-
apply
- Overrides:
applyin classLineString
-
copyInternal
- Overrides:
copyInternalin classLinearRing
-
normalize
public void normalize()- Overrides:
normalizein classLineString
-
isSimple
public boolean isSimple() -
isValid
public boolean isValid() -
distance
-
isWithinDistance
- Overrides:
isWithinDistancein classGeometry
-
getArea
public double getArea() -
getCentroid
- Overrides:
getCentroidin classGeometry
-
geometryChanged
public void geometryChanged()- Overrides:
geometryChangedin classGeometry
-
disjoint
-
touches
-
intersects
- Overrides:
intersectsin classGeometry
-
crosses
-
within
-
contains
-
overlaps
-
covers
-
coveredBy
-
relate
-
relate
-
buffer
-
buffer
-
buffer
-
convexHull
- Overrides:
convexHullin classGeometry
-
intersection
- Overrides:
intersectionin classGeometry
-
union
-
difference
- Overrides:
differencein classGeometry
-
symDifference
- Overrides:
symDifferencein classGeometry
-
union
-
norm
-
compareTo
- Specified by:
compareToin interfaceComparable- Overrides:
compareToin classGeometry
-
compareTo
-
toText
-