T - geometry typepublic class GeometryCollection<T extends Geometry> extends Geometry
| Modifier | Constructor and Description |
|---|---|
|
GeometryCollection()
Constructor
|
|
GeometryCollection(boolean hasZ,
boolean hasM)
Constructor
|
|
GeometryCollection(GeometryCollection<T> geometryCollection)
Copy Constructor
|
protected |
GeometryCollection(GeometryType type,
boolean hasZ,
boolean hasM)
Constructor
|
|
GeometryCollection(List<T> geometries)
Constructor
|
|
GeometryCollection(T geometry)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGeometries(List<T> geometries)
Add geometries
|
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
|
T |
getGeometry(int n)
Returns the Nth geometry
|
int |
hashCode() |
boolean |
isEmpty()
Is the Geometry empty
|
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 |
boolean |
isSimple()
Determine if this Geometry has no anomalous geometric points, such as
self intersection or self tangency
|
int |
numGeometries()
Get the number of geometries in the collection
|
void |
setGeometries(List<T> geometries)
Set the geometries
|
getCentroid, getDimension, getEnvelope, getGeometryType, hasM, hasZ, is3D, isMeasuredpublic GeometryCollection()
public GeometryCollection(boolean hasZ,
boolean hasM)
hasZ - has zhasM - has mpublic GeometryCollection(List<T> geometries)
geometries - list of geometriespublic GeometryCollection(T geometry)
geometry - geometrypublic 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 void addGeometries(List<T> geometries)
geometries - geometriespublic int numGeometries()
public T getGeometry(int n)
n - nth geometry to returnpublic 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()
public boolean isEmpty()
public boolean isSimple()
Copyright © 2019 National Geospatial-Intelligence Agency. All rights reserved.