public class GeometryCollection<T extends Geometry> extends Geometry
| Modifier | Constructor and Description |
|---|---|
|
GeometryCollection()
Constructor
|
|
GeometryCollection(boolean hasZ,
boolean hasM)
Constructor
|
|
GeometryCollection(GeometryCollection<T> geometryCollection)
Constructor
|
protected |
GeometryCollection(GeometryType type,
boolean hasZ,
boolean hasM)
Constructor
|
|
GeometryCollection(List<T> geometries)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGeometry(T geometry)
Add a geometry
|
Geometry |
copy()
Copy the geometry
|
boolean |
equals(Object obj) |
GeometryCollection<Geometry> |
getAsGeometryCollection()
Get as a top level Geometry Collection
|
GeometryCollection<Curve> |
getAsMultiCurve()
Get as a Multi Curve, a
Curve typed Geometry Collection |
MultiLineString |
getAsMultiLineString()
Get as a
MultiLineString, either the current instance or newly
created from the LineString geometries |
MultiPoint |
getAsMultiPoint()
Get as a
MultiPoint, either the current instance or newly created
from the Point geometries |
MultiPolygon |
getAsMultiPolygon()
Get as a
MultiPolygon, either the current instance or newly
created from the Polygon geometries |
GeometryCollection<Surface> |
getAsMultiSurface()
Get as a Multi Surface, a
Surface typed Geometry Collection |
GeometryType |
getCollectionType()
Get the collection type by evaluating the geometries
|
List<T> |
getGeometries()
Get the list of geometries
|
int |
hashCode() |
boolean |
isMultiCurve()
Determine if this geometry collection contains only
Curve
geometries |
boolean |
isMultiLineString()
Determine if this geometry collection is a
MultiLineString
instance or contains only LineString geometries |
boolean |
isMultiPoint()
Determine if this geometry collection is a
MultiPoint instance or
contains only Point geometries |
boolean |
isMultiPolygon()
Determine if this geometry collection is a
MultiPolygon instance
or contains only Polygon geometries |
boolean |
isMultiSurface()
Determine if this geometry collection contains only
Surface
geometries |
int |
numGeometries()
Get the number of geometries in the collection
|
void |
setGeometries(List<T> geometries)
Set the geometries
|
getGeometryType, getWkbCode, hasM, hasZpublic GeometryCollection()
public GeometryCollection(boolean hasZ,
boolean hasM)
hasZ - has zhasM - has mpublic GeometryCollection(List<T> geometries)
geometries - list of geometriespublic GeometryCollection(GeometryCollection<T> geometryCollection)
geometryCollection - geometry collection to copyprotected GeometryCollection(GeometryType type, boolean hasZ, boolean hasM)
type - geometry typehasZ - has zhasM - has mpublic void setGeometries(List<T> geometries)
geometries - geometriespublic void addGeometry(T geometry)
geometry - geometrypublic int numGeometries()
public GeometryType getCollectionType()
GeometryType.MULTIPOINT
, GeometryType.MULTILINESTRING,
GeometryType.MULTIPOLYGON,
GeometryType.MULTICURVE,
GeometryType.MULTISURFACE,
GeometryType.GEOMETRYCOLLECTIONpublic boolean isMultiPoint()
MultiPoint instance or
contains only Point geometriespublic MultiPoint getAsMultiPoint()
MultiPoint, either the current instance or newly created
from the Point geometriespublic boolean isMultiLineString()
MultiLineString
instance or contains only LineString geometriespublic MultiLineString getAsMultiLineString()
MultiLineString, either the current instance or newly
created from the LineString geometriespublic boolean isMultiPolygon()
MultiPolygon instance
or contains only Polygon geometriespublic MultiPolygon getAsMultiPolygon()
MultiPolygon, either the current instance or newly
created from the Polygon geometriespublic boolean isMultiCurve()
Curve
geometriespublic GeometryCollection<Curve> getAsMultiCurve()
Curve typed Geometry Collectionpublic boolean isMultiSurface()
Surface
geometriespublic GeometryCollection<Surface> getAsMultiSurface()
Surface typed Geometry Collectionpublic GeometryCollection<Geometry> getAsGeometryCollection()
public Geometry copy()
Copyright © 2018 National Geospatial-Intelligence Agency. All rights reserved.