org.geotools.geometry.jts

## Class CurvePolygon

• Object
• Geometry
• Polygon
• CurvePolygon
• All Implemented Interfaces:
Serializable, Cloneable, Comparable, CurvedGeometry<Polygon>, Polygonal

```public class CurvePolygon
extends Polygon
implements CurvedGeometry<Polygon>```
A subclass of polygon that can host also curves and will linearize if needed
Author:
Andrea Aime - GeoSolutions
Serialized Form

• ### Fields inherited from class Polygon

`holes, shell`
• ### Fields inherited from class Geometry

`envelope, factory, SRID`
• ### Constructor Summary

Constructors
Constructor and Description
```CurvePolygon(LinearRing shell, LinearRing[] holes, GeometryFactory factory, double tolerance)```
```CurvePolygon(LinearRing shell, List<LinearRing> holes, GeometryFactory factory, double tolerance)```
• ### Method Summary

All Methods
Modifier and Type Method and Description
`CurvePolygon` `copyInternal()`
`int` `getCoordinatesDimension()`
Returns the dimension of the geometry without forcing access to the coordinate sequence
`double` `getTolerance()`
The default linearization tolerance
`Polygon` `linearize()`
Linearizes the geometry using the built-in linearization tolerance
`Polygon` `linearize(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, see `CircularArc.MAX_SEGMENTS_QUADRANT`
`String` `toCurvedText()`
Parallel method to `Geometry.toText()` that will output the geometry as curved instead of as linear
`String` `toString()`
• ### Methods inherited from class Polygon

`apply, apply, apply, apply, clone, compareToSameClass, compareToSameClass, computeEnvelopeInternal, convexHull, equalsExact, getArea, getBoundary, getBoundaryDimension, getCoordinate, getCoordinates, getDimension, getExteriorRing, getGeometryType, getInteriorRingN, getLength, getNumInteriorRing, getNumPoints, getSortIndex, isEmpty, isRectangle, normalize, reverse`
• ### Methods inherited from class Geometry

`buffer, buffer, buffer, checkNotGeometryCollection, compare, compareTo, compareTo, contains, copy, coveredBy, covers, crosses, difference, disjoint, distance, equal, equals, equals, equalsExact, equalsNorm, equalsTopo, geometryChanged, geometryChangedAction, getCentroid, getEnvelope, getEnvelopeInternal, getFactory, getGeometryN, getInteriorPoint, getNumGeometries, getPrecisionModel, getSRID, getUserData, hashCode, hasNonEmptyElements, hasNullElements, intersection, intersects, isEquivalentClass, isGeometryCollection, isSimple, isValid, isWithinDistance, norm, overlaps, relate, relate, setSRID, setUserData, symDifference, toText, touches, union, union, within`
• ### Methods inherited from class Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`
• ### Constructor Detail

• #### CurvePolygon

```public CurvePolygon(LinearRing shell,
List<LinearRing> holes,
GeometryFactory factory,
double tolerance)```
• #### CurvePolygon

```public CurvePolygon(LinearRing shell,
LinearRing[] holes,
GeometryFactory factory,
double tolerance)```
• ### Method Detail

• #### linearize

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

`public Polygon 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<Polygon>`
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`
• #### 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<Polygon>`
• #### getTolerance

`public double getTolerance()`
Description copied from interface: `CurvedGeometry`
The default linearization tolerance
Specified by:
`getTolerance` in interface `CurvedGeometry<Polygon>`
• #### 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<Polygon>`
• #### copyInternal

`public CurvePolygon copyInternal()`
Overrides:
`copyInternal` in class `Polygon`
• #### toString

`public String toString()`
Overrides:
`toString` in class `Geometry`