class GeometryFactory extends Serializable
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- GeometryFactory
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new GeometryFactory()
Constructs a GeometryFactory that generates Geometries having a floating PrecisionModel and a spatial-reference ID of 0.
- new GeometryFactory(precisionModel: PrecisionModel, SRID: Int)
Constructs a GeometryFactory that generates Geometries having the given {link PrecisionModel} and spatial-reference ID, and the default CoordinateSequence implementation.
Constructs a GeometryFactory that generates Geometries having the given {link PrecisionModel} and spatial-reference ID, and the default CoordinateSequence implementation.
- precisionModel
the PrecisionModel to use
- SRID
the SRID to use
- new GeometryFactory(precisionModel: PrecisionModel)
Constructs a GeometryFactory that generates Geometries having the given {link PrecisionModel} and the default CoordinateSequence implementation.
Constructs a GeometryFactory that generates Geometries having the given {link PrecisionModel} and the default CoordinateSequence implementation.
- precisionModel
the PrecisionModel to use
- new GeometryFactory(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.
- new GeometryFactory(precisionModel: PrecisionModel, SRID: Int, coordinateSequenceFactory: CoordinateSequenceFactory)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- var SRID: Int
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def buildGeometry(geomList: Collection[Geometry]): Geometry
Build an appropriate
Geometry,MultiGeometry, orGeometryCollectionto contain theGeometrys in it.Build an appropriate
Geometry,MultiGeometry, orGeometryCollectionto contain theGeometrys in it. For example:- If
geomListcontains a singlePolygon, thePolygonis returned. - If
geomListcontains severalPolygons, aMultiPolygonis returned. - If
geomListcontains somePolygons and someLineStrings, aGeometryCollectionis returned. - If
geomListis empty, an emptyGeometryCollectionis returned
Note that this method does not "flatten" Geometries in the input, and hence if any MultiGeometries are contained in the input a GeometryCollection containing them will be returned.
- geomList
the
Geometrys to combine return aGeometryof the "smallest", "most type-specific" class that can contain the elements ofgeomList.
- If
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- var coordinateSequenceFactory: CoordinateSequenceFactory
- def createEmpty(dimension: Int): Geometry
Creates an empty atomic geometry of the given dimension.
Creates an empty atomic geometry of the given dimension. If passed a dimension of -1 will create an empty {link GeometryCollection}.
- dimension
the required dimension (-1, 0, 1 or 2) return an empty atomic geometry of given dimension
- def createGeometry(g: Geometry): Geometry
Creates a deep copy of the input {link 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.
This is a convenient way to change the CoordinateSequence used to represent a geometry, or to change the factory used for a geometry.
{link Geometry#copy()} can also be used to make a deep copy, but it does not allow changing the CoordinateSequence type.
return a deep copy of the input geometry, using the CoordinateSequence type of this factory
- See also
Geometry#copy()
- def createGeometryCollection(geometries: Array[Geometry]): GeometryCollection
Creates a GeometryCollection using the given Geometries; a null or empty array will create an empty GeometryCollection.
Creates a GeometryCollection using the given Geometries; a null or empty array will create an empty GeometryCollection.
- geometries
an array of Geometries, each of which may be empty but not null, or null return the created GeometryCollection
- def createGeometryCollection: GeometryCollection
Constructs an empty {link GeometryCollection} geometry.
Constructs an empty {link GeometryCollection} geometry.
return an empty GeometryCollection
- def createLineString(coordinates: CoordinateSequence): LineString
Creates a LineString using the given CoordinateSequence.
Creates a LineString using the given CoordinateSequence. A null or empty CoordinateSequence creates an empty LineString.
- coordinates
a CoordinateSequence (possibly empty), or null
- def createLineString(coordinates: Array[Coordinate]): LineString
Creates a LineString using the given Coordinates.
Creates a LineString using the given Coordinates. A null or empty array creates an empty LineString.
- coordinates
an array without null elements, or an empty array, or null
- def createLineString: LineString
Constructs an empty {link LineString} geometry.
Constructs an empty {link LineString} geometry.
return an empty LineString
- def createLinearRing(coordinates: CoordinateSequence): LinearRing
Creates a {link LinearRing} using the given {link CoordinateSequence}.
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.
- coordinates
a CoordinateSequence (possibly empty), or null return the created LinearRing throws IllegalArgumentException if the ring is not closed, or has too few points
- def createLinearRing(coordinates: Array[Coordinate]): LinearRing
Creates a {link LinearRing} using the given {link Coordinate}s.
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.
- 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
- def createLinearRing: LinearRing
Constructs an empty {link LinearRing} geometry.
Constructs an empty {link LinearRing} geometry.
return an empty LinearRing
- def createMultiLineString(lineStrings: Array[LineString]): MultiLineString
Creates a MultiLineString using the given LineStrings; a null or empty array will create an empty MultiLineString.
Creates a MultiLineString using the given LineStrings; a null or empty array will create an empty MultiLineString.
- lineStrings
LineStrings, each of which may be empty but not null return the created MultiLineString
- def createMultiLineString: MultiLineString
Constructs an empty {link MultiLineString} geometry.
Constructs an empty {link MultiLineString} geometry.
return an empty MultiLineString
- def createMultiPoint(coordinates: CoordinateSequence): MultiPoint
Creates a {link MultiPoint} using the points in the given {link CoordinateSequence}.
Creates a {link MultiPoint} using the points in the given {link CoordinateSequence}. A
nullor empty CoordinateSequence creates an empty MultiPoint.- coordinates
a CoordinateSequence (possibly empty), or
nullreturn a MultiPoint geometry
- def createMultiPoint(point: Array[Point]): MultiPoint
Creates a {link MultiPoint} using the given {link Point}s.
Creates a {link MultiPoint} using the given {link Point}s. A null or empty array will create an empty MultiPoint.
- point
an array of Points (without null elements), or an empty array, or
nullreturn a MultiPoint object
- def createMultiPoint: MultiPoint
Constructs an empty {link MultiPoint} geometry.
Constructs an empty {link MultiPoint} geometry.
return an empty MultiPoint
- def createMultiPointFromCoords(coordinates: Array[Coordinate]): MultiPoint
Creates a {link MultiPoint} using the given {link Coordinate}s.
Creates a {link MultiPoint} using the given {link Coordinate}s. A null or empty array will create an empty MultiPoint.
- coordinates
an array (without null elements), or an empty array, or
nullreturn a MultiPoint object
- def createMultiPolygon(polygons: Array[Polygon]): MultiPolygon
Creates a MultiPolygon using the given Polygons; a null or empty array will create an empty Polygon.
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 <A HREF="http://www.opengis.org/techno/specs.htm">OpenGIS Simple Features Specification for SQL</A>.
- polygons
Polygons, each of which may be empty but not null return the created MultiPolygon
- def createMultiPolygon: MultiPolygon
Constructs an empty {link MultiPolygon} geometry.
Constructs an empty {link MultiPolygon} geometry.
return an empty MultiPolygon
- def createPoint(coordinates: CoordinateSequence): Point
Creates a Point using the given CoordinateSequence; a null or empty CoordinateSequence will create an empty Point.
Creates a Point using the given CoordinateSequence; a null or empty CoordinateSequence will create an empty Point.
- coordinates
a CoordinateSequence (possibly empty), or null return the created Point
- def createPoint(coordinate: Coordinate): Point
Creates a Point using the given Coordinate.
Creates a Point using the given Coordinate. A null Coordinate creates an empty Geometry.
- coordinate
a Coordinate, or null return the created Point
- def createPoint: Point
Constructs an empty {link Point} geometry.
Constructs an empty {link Point} geometry.
return an empty Point
- def createPolygon: Polygon
Constructs an empty {link Polygon} geometry.
Constructs an empty {link Polygon} geometry.
return an empty polygon
- def createPolygon(shell: LinearRing): Polygon
- def createPolygon(shell: Array[Coordinate]): Polygon
- def createPolygon(shell: CoordinateSequence): Polygon
Constructs a
Polygonwith the given exterior boundary.Constructs a
Polygonwith the given exterior boundary.- shell
the outer boundary of the new
Polygon, ornullor an emptyLinearRingif the empty geometry is to be created. throws IllegalArgumentException if the boundary ring is invalid
- def createPolygon(shell: LinearRing, holes: Array[LinearRing]): Polygon
Constructs a
Polygonwith the given exterior boundary and interior boundaries.Constructs a
Polygonwith the given exterior boundary and interior boundaries.- shell
the outer boundary of the new
Polygon, ornullor an emptyLinearRingif the empty geometry is to be created.- holes
the inner boundaries of the new
Polygon, ornullor emptyLinearRings if the empty geometry is to be created. throws IllegalArgumentException if a ring is invalid
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getCoordinateSequenceFactory: CoordinateSequenceFactory
- def getPrecisionModel: PrecisionModel
Returns the PrecisionModel that Geometries created by this factory will be associated with.
Returns the PrecisionModel that Geometries created by this factory will be associated with.
return the PrecisionModel for this factory
- def getSRID: Int
Gets the SRID value defined for this factory.
Gets the SRID value defined for this factory.
return the factory SRID value
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- var precisionModel: PrecisionModel
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toGeometry(envelope: Envelope): Geometry
Creates a {link Geometry} with the same extent as the given envelope.
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:
If the
Envelopeis:- null : returns an empty {link Point}
- a point : returns a non-empty {link Point}
- a line : returns a two-point {link LineString}
- a rectangle : returns a {link Polygon} whose points are (minx, miny), (minx, maxy), (maxx, maxy), (maxx, miny), (minx, miny).
- envelope
the
Envelopeto convert return an emptyPoint(for nullEnvelopes), aPoint(when min x = max x and min y = max y) or aPolygon(in all other cases)
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def createMultiPoint(coordinates: Array[Coordinate]): MultiPoint
Creates a {link MultiPoint} using the given {link Coordinate}s.
Creates a {link MultiPoint} using the given {link Coordinate}s. A null or empty array will create an empty MultiPoint.
- coordinates
an array (without null elements), or an empty array, or
nullreturn a MultiPoint object
- Deprecated
Use { @link GeometryFactory#createMultiPointFromCoords} instead