GeometryFactory class

Constructors

GeometryFactory(PrecisionModel precisionModel, int SRID, CoordinateSequenceFactory coordinateSequenceFactory)
Constructs a GeometryFactory that generates Geometries having the given PrecisionModel, spatial-reference ID, and CoordinateSequence implementation.
GeometryFactory.defaultPrecision()
Constructs a GeometryFactory that generates Geometries having a floating PrecisionModel and a spatial-reference ID of 0.
GeometryFactory.withCoordinateSequenceFactory(CoordinateSequenceFactory coordinateSequenceFactory)
Constructs a GeometryFactory that generates Geometries having the given CoordinateSequence implementation, a double-precision floating PrecisionModel and a spatial-reference ID of 0.
GeometryFactory.withPrecisionModel(PrecisionModel precisionModel)
Constructs a GeometryFactory that generates Geometries having the given {@link PrecisionModel} and the default CoordinateSequence implementation.
GeometryFactory.withPrecisionModelSrid(PrecisionModel precisionModel, int SRID)
Constructs a GeometryFactory that generates Geometries having the given {@link PrecisionModel} and spatial-reference ID, and the default CoordinateSequence implementation.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildGeometry(List<Geometry> geomList) Geometry
Build an appropriate Geometry, MultiGeometry, or GeometryCollection to contain the Geometrys in it. For example:
createEmpty(int dimension) Geometry
Creates an empty atomic geometry of the given dimension. If passed a dimension of -1 will create an empty {@link GeometryCollection}.
createGeometry(Geometry? g) Geometry?
Creates a deep copy of the input {@link Geometry}. The {@link CoordinateSequenceFactory} defined for this factory is used to copy the {@link CoordinateSequence}s of the input geometry.
createGeometryCollection(List<Geometry>? geometries) GeometryCollection
Creates a GeometryCollection using the given Geometries; a null or empty array will create an empty GeometryCollection.
createGeometryCollectionEmpty() GeometryCollection
Constructs an empty {@link GeometryCollection} geometry.
createLinearRing(List<Coordinate>? coordinates) LinearRing
Creates a {@link LinearRing} using the given {@link Coordinate}s. A null or empty array creates an empty LinearRing. The points must form a closed and simple linestring. @param coordinates an array without null elements, or an empty array, or null @return the created LinearRing @throws IllegalArgumentException if the ring is not closed, or has too few points
createLinearRingEmpty() LinearRing
Constructs an empty {@link LinearRing} geometry.
createLinearRingSeq(CoordinateSequence? coordinates) LinearRing
Creates a {@link LinearRing} using the given {@link CoordinateSequence}. A null or empty array creates an empty LinearRing. The points must form a closed and simple linestring.
createLineString(List<Coordinate>? coordinates) LineString
Creates a LineString using the given Coordinates. A null or empty array creates an empty LineString.
createLineStringEmpty() LineString
Constructs an empty {@link LineString} geometry.
createLineStringSeq(CoordinateSequence? coordinates) LineString
Creates a LineString using the given CoordinateSequence. A null or empty CoordinateSequence creates an empty LineString.
createMultiLineString(List<LineString>? lineStrings) MultiLineString
Creates a MultiLineString using the given LineStrings; a null or empty array will create an empty MultiLineString.
createMultiLineStringEmpty() MultiLineString
Constructs an empty {@link MultiLineString} geometry.
createMultiPoint(List<Point>? point) MultiPoint
Creates a {@link MultiPoint} using the given {@link Point}s. A null or empty array will create an empty MultiPoint.
createMultiPointEmpty() MultiPoint
Constructs an empty {@link MultiPoint} geometry.
createMultiPointFromCoords(List<Coordinate>? coordinates) MultiPoint
Creates a {@link MultiPoint} using the given {@link Coordinate}s. A null or empty array will create an empty MultiPoint.
createMultiPointSeq(CoordinateSequence? coordinates) MultiPoint
Creates a {@link MultiPoint} using the points in the given {@link CoordinateSequence}. A null or empty CoordinateSequence creates an empty MultiPoint.
createMultiPolygon(List<Polygon>? polygons) MultiPolygon
Creates a MultiPolygon using the given Polygons; a null or empty array will create an empty Polygon. The polygons must conform to the assertions specified in the OpenGIS Simple Features Specification for SQL.
createMultiPolygonEmpty() MultiPolygon
Constructs an empty {@link MultiPolygon} geometry.
createPoint(Coordinate? coordinate) Point
Creates a Point using the given Coordinate. A null Coordinate creates an empty Geometry.
createPointEmpty() Point
Constructs an empty {@link Point} geometry.
createPointSeq(CoordinateSequence? coordinates) Point
Creates a Point using the given CoordinateSequence; a null or empty CoordinateSequence will create an empty Point.
createPolygon(LinearRing? shell, List<LinearRing>? holes) Polygon
Constructs a Polygon with the given exterior boundary and interior boundaries.
createPolygonEmpty() Polygon
Constructs an empty {@link Polygon} geometry.
createPolygonFromCoords(List<Coordinate>? shell) Polygon
Constructs a Polygon with the given exterior boundary.
createPolygonFromRing(LinearRing? shell) Polygon
Constructs a Polygon with the given exterior boundary.
createPolygonSeq(CoordinateSequence shell) Polygon
Constructs a Polygon with the given exterior boundary.
getCoordinateSequenceFactory() CoordinateSequenceFactory
getPrecisionModel() PrecisionModel
Returns the PrecisionModel that Geometries created by this factory will be associated with.
getSRID() int
Gets the SRID value defined for this factory.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toGeometry(Envelope envelope) Geometry
Creates a {@link Geometry} with the same extent as the given envelope. The Geometry returned is guaranteed to be valid. To provide this behaviour, the following cases occur:
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited