public class GeometryFactory extends Object
Geometrys.
This factory is provided as a convenience. It ensures that a set of Geometrys are
created with the same spatial reference system and GeometryOperations implementation.
| Constructor and Description |
|---|
GeometryFactory()
Creates a
GeometryFactory that creates Geometrys
with the default GeometryOperations
implementation. |
GeometryFactory(GeometryOperations geometryOperations)
Creates a
GeometryFactory that creates Geometrys
with the specified GeometryOperations. |
| Modifier and Type | Method and Description |
|---|---|
GeometryCollection |
createGeometryCollection(Geometry[] geometries)
Creates a
GeometryCollection from the specified Geometrys. |
LinearRing |
createLinearRing(PointSequence points)
Creates a
LinearRing |
LineString |
createLineString(PointSequence points)
Creates a
LineString |
MultiLineString |
createMultiLineString(LineString[] lineStrings)
Creates a
MultiLineString from the specified LineStrings. |
MultiPoint |
createMultiPoint(Point[] points)
Creates a
MultiPoint from the specified Points. |
MultiPolygon |
createMultiPolygon(Polygon[] polygons)
Creates a
MultiPolygon from the specified Polygons. |
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 Geometrys
with the specified GeometryOperations.geometryOperations - the GeometryOperations implementationpublic GeometryFactory()
GeometryFactory that creates Geometrys
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)
LineStringpoints - the points of the linestringpublic LinearRing createLinearRing(PointSequence points)
LinearRingpoints - 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 Geometrys.geometries - the constituent Geometrys for the new GeometryCollection. *public MultiPoint createMultiPoint(Point[] points)
MultiPoint from the specified Points.points - the constituent Points of the new MultiPoint.public MultiLineString createMultiLineString(LineString[] lineStrings)
MultiLineString from the specified LineStrings.lineStrings - the constituent LineStrings of the new MultiLineString.public MultiPolygon createMultiPolygon(Polygon[] polygons)
MultiPolygon from the specified Polygons.polygons - the constituent Polygons of the new MultiPolygon.Copyright © 2015 geolatte.org. All rights reserved.