public class GeometryFactory extends Object
Geometry
s.
This factory is provided as a convenience. It ensures that a set of Geometry
s are
created with the same spatial reference system and GeometryOperations
implementation.
Constructor and Description |
---|
GeometryFactory()
Creates a
GeometryFactory that creates Geometry s
with the default GeometryOperations
implementation. |
GeometryFactory(GeometryOperations geometryOperations)
Creates a
GeometryFactory that creates Geometry s
with the specified GeometryOperations . |
Modifier and Type | Method and Description |
---|---|
GeometryCollection |
createGeometryCollection(Geometry[] geometries)
Creates a
GeometryCollection from the specified Geometry s. |
LinearRing |
createLinearRing(PointSequence points)
Creates a
LinearRing |
LineString |
createLineString(PointSequence points)
Creates a
LineString |
MultiLineString |
createMultiLineString(LineString[] lineStrings)
Creates a
MultiLineString from the specified LineString s. |
MultiPoint |
createMultiPoint(Point[] points)
Creates a
MultiPoint from the specified Point s. |
MultiPolygon |
createMultiPolygon(Polygon[] polygons)
Creates a
MultiPolygon from the specified Polygon s. |
Point |
createPoint(PointSequence points)
Creates a
Point . |
Polygon |
createPolygon(LinearRing[] rings)
Creates a
Polygon . |
Polygon |
createPolygon(PointSequence points)
Creates a
Polygon without any holes. |
public GeometryFactory(GeometryOperations geometryOperations)
GeometryFactory
that creates Geometry
s
with the specified GeometryOperations
.geometryOperations
- the GeometryOperations
implementationpublic GeometryFactory()
GeometryFactory
that creates Geometry
s
with the default GeometryOperations
implementation.public Point createPoint(PointSequence points)
Point
.points
- the coordinates of the pointPoint
with the specified coordinatespublic LineString createLineString(PointSequence points)
LineString
points
- the points of the linestringpublic LinearRing createLinearRing(PointSequence points)
LinearRing
points
- the points of the ringLinearRing
with the specified points.IllegalArgumentException
- if the input PointSequence
does not form a closed ring.public Polygon createPolygon(PointSequence points)
Polygon
without any holes.points
- the points of the outer ring.public Polygon createPolygon(LinearRing[] rings)
Polygon
.
The first LinearRing
in the rings parameter is the outer
ring (or shell) of this Polygon
. The other rings determine
holes within it.
rings
- the LinearRings
that defined this Polygon
.public GeometryCollection createGeometryCollection(Geometry[] geometries)
GeometryCollection
from the specified Geometry
s.geometries
- the constituent Geometry
s for the new GeometryCollection
. *public MultiPoint createMultiPoint(Point[] points)
MultiPoint
from the specified Point
s.points
- the constituent Point
s of the new MultiPoint
.public MultiLineString createMultiLineString(LineString[] lineStrings)
MultiLineString
from the specified LineString
s.lineStrings
- the constituent LineString
s of the new MultiLineString
.public MultiPolygon createMultiPolygon(Polygon[] polygons)
MultiPolygon
from the specified Polygon
s.polygons
- the constituent Polygon
s of the new MultiPolygon
.Copyright © 2015 geolatte.org. All rights reserved.