Package org.geotools.geometry.jts
Class CurvedGeometryFactory
- Object
-
- GeometryFactory
-
- CurvedGeometryFactory
-
- All Implemented Interfaces:
Serializable
public class CurvedGeometryFactory extends GeometryFactory
AGeometryFactory
with extra methods to generateCurvedGeometry
instances- Author:
- Andrea Aime - GeoSolutions
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CurvedGeometryFactory(double tolerance)
CurvedGeometryFactory(GeometryFactory delegate, double tolerance)
-
Method Summary
-
Methods inherited from class GeometryFactory
createEmpty, createGeometryCollection, createLinearRing, createLineString, createMultiLineString, createMultiPoint, createMultiPointFromCoords, createMultiPolygon, createPoint, createPointFromInternalCoord, createPolygon, toGeometryArray, toLinearRingArray, toLineStringArray, toMultiLineStringArray, toMultiPointArray, toMultiPolygonArray, toPointArray, toPolygonArray
-
-
-
-
Constructor Detail
-
CurvedGeometryFactory
public CurvedGeometryFactory(double tolerance)
-
CurvedGeometryFactory
public CurvedGeometryFactory(GeometryFactory delegate, double tolerance)
-
-
Method Detail
-
createCircularString
public LineString createCircularString(int dimension, double... controlPoints)
Creates aCircularString
- Parameters:
dimension
- Number of dimensions in the control point array. For the time being, any value other than 2 will cause a IllegalArgumentException
-
createCurvedGeometry
public LineString createCurvedGeometry(int dimension, double... controlPoints)
Creates aCircularString
or aCircularRing
depending on whether the points are forming a closed ring, or not- Parameters:
dimension
- Number of dimensions in the control point array. For the time being, any value other than 2 will cause a IllegalArgumentException
-
createCircularString
public LineString createCircularString(CoordinateSequence cs)
Creates aCircularString
-
createCurvedGeometry
public LineString createCurvedGeometry(CoordinateSequence cs)
Creates aCircularString
or aCircularRing
depending on whether the points are forming a closed ring, or not
-
createCurvedGeometry
public LineString createCurvedGeometry(LineString... components)
Creates a compound curve with the given components
-
createCurvedGeometry
public LineString createCurvedGeometry(List<LineString> components)
Creates a compound curve with the given components
-
createCurvePolygon
public Polygon createCurvePolygon(LinearRing shell, LinearRing... holes)
Explicitly creates aCurvePolygon
-
createMultiSurface
public MultiPolygon createMultiSurface(List<Polygon> polygons)
Explicitly creates aMultiSurface
-
createMultiCurve
public MultiCurve createMultiCurve(List<LineString> components)
Explicitly creates aMultiCurve
-
getTolerance
public double getTolerance()
Returns the linearization tolerance used to create the curved geometries
-
toGeometry
public Geometry toGeometry(Envelope envelope)
- Overrides:
toGeometry
in classGeometryFactory
-
getPrecisionModel
public PrecisionModel getPrecisionModel()
- Overrides:
getPrecisionModel
in classGeometryFactory
-
createPoint
public Point createPoint(Coordinate coordinate)
- Overrides:
createPoint
in classGeometryFactory
-
createPoint
public Point createPoint(CoordinateSequence coordinates)
- Overrides:
createPoint
in classGeometryFactory
-
createMultiLineString
public MultiLineString createMultiLineString(LineString[] lineStrings)
- Overrides:
createMultiLineString
in classGeometryFactory
-
createGeometryCollection
public GeometryCollection createGeometryCollection(Geometry[] geometries)
- Overrides:
createGeometryCollection
in classGeometryFactory
-
createMultiPolygon
public MultiPolygon createMultiPolygon(Polygon[] polygons)
- Overrides:
createMultiPolygon
in classGeometryFactory
-
createLinearRing
public LinearRing createLinearRing(Coordinate[] coordinates)
- Overrides:
createLinearRing
in classGeometryFactory
-
createLinearRing
public LinearRing createLinearRing(CoordinateSequence coordinates)
- Overrides:
createLinearRing
in classGeometryFactory
-
createMultiPoint
public MultiPoint createMultiPoint(Point[] point)
- Overrides:
createMultiPoint
in classGeometryFactory
-
createMultiPoint
public MultiPoint createMultiPoint(Coordinate[] coordinates)
- Overrides:
createMultiPoint
in classGeometryFactory
-
createMultiPoint
public MultiPoint createMultiPoint(CoordinateSequence coordinates)
- Overrides:
createMultiPoint
in classGeometryFactory
-
createPolygon
public Polygon createPolygon(LinearRing shell, LinearRing[] holes)
- Overrides:
createPolygon
in classGeometryFactory
-
createPolygon
public Polygon createPolygon(CoordinateSequence coordinates)
- Overrides:
createPolygon
in classGeometryFactory
-
createPolygon
public Polygon createPolygon(Coordinate[] coordinates)
- Overrides:
createPolygon
in classGeometryFactory
-
createPolygon
public Polygon createPolygon(LinearRing shell)
- Overrides:
createPolygon
in classGeometryFactory
-
buildGeometry
public Geometry buildGeometry(Collection geomList)
- Overrides:
buildGeometry
in classGeometryFactory
-
createLineString
public LineString createLineString(Coordinate[] coordinates)
- Overrides:
createLineString
in classGeometryFactory
-
createLineString
public LineString createLineString(CoordinateSequence coordinates)
- Overrides:
createLineString
in classGeometryFactory
-
createGeometry
public Geometry createGeometry(Geometry g)
- Overrides:
createGeometry
in classGeometryFactory
-
getSRID
public int getSRID()
- Overrides:
getSRID
in classGeometryFactory
-
getCoordinateSequenceFactory
public CoordinateSequenceFactory getCoordinateSequenceFactory()
- Overrides:
getCoordinateSequenceFactory
in classGeometryFactory
-
hasCurves
public boolean hasCurves(Geometry g)
Returns true if the geometry is a curved geometry, or contains curved geometries
-
-