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_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
ConstructorsConstructorDescriptionCircularRing
(double[] controlPoints, GeometryFactory factory, double tolerance) CircularRing
(CoordinateSequence points, GeometryFactory factory, double tolerance) -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(CoordinateFilter filter) void
apply
(CoordinateSequenceFilter filter) void
apply
(GeometryComponentFilter filter) void
apply
(GeometryFilter filter) buffer
(double distance) buffer
(double distance, int quadrantSegments) buffer
(double distance, int quadrantSegments, int endCapStyle) int
int
compareTo
(Object o, CoordinateSequenceComparator comp) protected Envelope
boolean
boolean
boolean
boolean
difference
(Geometry other) boolean
double
boolean
boolean
boolean
equalsExact
(Geometry other) boolean
equalsExact
(Geometry other, double tolerance) boolean
boolean
equalsTopo
(Geometry other) void
getArcN
(int arcIndex) Returns the n-th circular arc making up the geometrydouble
getArea()
int
double[]
Returns the control points for this string/ring.getCoordinateN
(int n) int
Returns the dimension of the geometry without forcing access to the coordinate sequenceint
getGeometryN
(int n) double
getLinearizedCoordinateSequence
(double tolerance) Returns the linearized coordinates at the given toleranceint
Number of arc circlesint
int
getPointN
(int n) int
getSRID()
double
The default linearization toleranceint
hashCode()
intersection
(Geometry other) boolean
boolean
isClosed()
boolean
boolean
isEmpty()
boolean
boolean
isRing()
boolean
isSimple()
boolean
isValid()
boolean
isWithinDistance
(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_QUADRANT
norm()
void
Returns a normalized ring (one that does not have a single arc closing on itself)boolean
boolean
reverse()
void
setSRID
(int SRID) void
setUserData
(Object userData) symDifference
(Geometry other) Parallel method toGeometry.toText()
that will output the geometry as curved instead of as lineartoString()
toText()
boolean
union()
boolean
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 Details
-
CircularRing
-
CircularRing
-
-
Method Details
-
getNumArcs
public int getNumArcs()Description copied from interface:SingleCurvedGeometry
Number of arc circles- Specified by:
getNumArcs
in interfaceSingleCurvedGeometry<LinearRing>
-
getArcN
Description copied from interface:SingleCurvedGeometry
Returns the n-th circular arc making up the geometry- Specified by:
getArcN
in interfaceSingleCurvedGeometry<LinearRing>
-
linearize
Description copied from interface:CurvedGeometry
Linearizes the geometry using the built-in linearization tolerance- Specified by:
linearize
in interfaceCurvedGeometry<LinearRing>
-
linearize
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, seeCircularArc.MAX_SEGMENTS_QUADRANT
- Specified by:
linearize
in 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:CurvedGeometry
The default linearization tolerance- Specified by:
getTolerance
in interfaceCurvedGeometry<LinearRing>
-
getLinearizedCoordinateSequence
Description copied from interface:SingleCurvedGeometry
Returns the linearized coordinates at the given tolerance- Specified by:
getLinearizedCoordinateSequence
in interfaceSingleCurvedGeometry<LinearRing>
-
getControlPoints
public double[] getControlPoints()Description copied from interface:SingleCurvedGeometry
Returns the control points for this string/ring.- Specified by:
getControlPoints
in interfaceSingleCurvedGeometry<LinearRing>
-
isClosed
public boolean isClosed()- Overrides:
isClosed
in classLinearRing
-
getDimension
public int getDimension()- Overrides:
getDimension
in classLineString
-
getBoundaryDimension
public int getBoundaryDimension()- Overrides:
getBoundaryDimension
in classLinearRing
-
isEmpty
public boolean isEmpty()- Overrides:
isEmpty
in classLineString
-
getGeometryType
- Overrides:
getGeometryType
in classLinearRing
-
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 interfaceCurvedGeometry<LinearRing>
-
normalizeRing
Returns a normalized ring (one that does not have a single arc closing on itself) -
reverse
- Overrides:
reverse
in classLinearRing
-
reverseInternal
- Overrides:
reverseInternal
in classLinearRing
-
getNumGeometries
public int getNumGeometries()- Overrides:
getNumGeometries
in classGeometry
-
getGeometryN
- Overrides:
getGeometryN
in classGeometry
-
setUserData
- Overrides:
setUserData
in classGeometry
-
getSRID
public int getSRID() -
setSRID
public void setSRID(int SRID) -
getFactory
- Overrides:
getFactory
in classGeometry
-
getUserData
- Overrides:
getUserData
in classGeometry
-
getPrecisionModel
- Overrides:
getPrecisionModel
in classGeometry
-
isRectangle
public boolean isRectangle()- Overrides:
isRectangle
in classGeometry
-
getInteriorPoint
- Overrides:
getInteriorPoint
in classGeometry
-
getEnvelope
- Overrides:
getEnvelope
in classGeometry
-
getEnvelopeInternal
- Overrides:
getEnvelopeInternal
in classGeometry
-
computeEnvelopeInternal
- Overrides:
computeEnvelopeInternal
in classLineString
-
equalsExact
- Overrides:
equalsExact
in classGeometry
-
equalsExact
- Overrides:
equalsExact
in classLineString
-
equals
-
equalsTopo
- Overrides:
equalsTopo
in classGeometry
-
equals
-
hashCode
public int hashCode() -
toString
-
toCurvedText
Description copied from interface:CurvedGeometry
Parallel method toGeometry.toText()
that will output the geometry as curved instead of as linear- Specified by:
toCurvedText
in interfaceCurvedGeometry<LinearRing>
-
equalsNorm
- Overrides:
equalsNorm
in classGeometry
-
getCoordinates
- Overrides:
getCoordinates
in classLineString
-
getCoordinateSequence
- Overrides:
getCoordinateSequence
in classLineString
-
getCoordinateN
- Overrides:
getCoordinateN
in classLineString
-
getCoordinate
- Overrides:
getCoordinate
in classLineString
-
getNumPoints
public int getNumPoints()- Overrides:
getNumPoints
in classLineString
-
getPointN
- Overrides:
getPointN
in classLineString
-
getStartPoint
- Overrides:
getStartPoint
in classLineString
-
getEndPoint
- Overrides:
getEndPoint
in classLineString
-
isRing
public boolean isRing()- Overrides:
isRing
in classLineString
-
getLength
public double getLength()- Overrides:
getLength
in classLineString
-
getBoundary
- Overrides:
getBoundary
in classLineString
-
isCoordinate
- Overrides:
isCoordinate
in classLineString
-
apply
- Overrides:
apply
in classLineString
-
apply
- Overrides:
apply
in classLineString
-
apply
- Overrides:
apply
in classLineString
-
apply
- Overrides:
apply
in classLineString
-
copyInternal
- Overrides:
copyInternal
in classLinearRing
-
normalize
public void normalize()- Overrides:
normalize
in classLineString
-
isSimple
public boolean isSimple() -
isValid
public boolean isValid() -
distance
-
isWithinDistance
- Overrides:
isWithinDistance
in classGeometry
-
getArea
public double getArea() -
getCentroid
- Overrides:
getCentroid
in classGeometry
-
geometryChanged
public void geometryChanged()- Overrides:
geometryChanged
in classGeometry
-
disjoint
-
touches
-
intersects
- Overrides:
intersects
in classGeometry
-
crosses
-
within
-
contains
-
overlaps
-
covers
-
coveredBy
-
relate
-
relate
-
buffer
-
buffer
-
buffer
-
convexHull
- Overrides:
convexHull
in classGeometry
-
intersection
- Overrides:
intersection
in classGeometry
-
union
-
difference
- Overrides:
difference
in classGeometry
-
symDifference
- Overrides:
symDifference
in classGeometry
-
union
-
norm
-
compareTo
- Specified by:
compareTo
in interfaceComparable
- Overrides:
compareTo
in classGeometry
-
compareTo
-
toText
-