Package com.massifmaps.geometry
Class MultiPolygonGeometry
java.lang.Object
com.massifmaps.geometry.Geometry
com.massifmaps.geometry.MultiGeometry
com.massifmaps.geometry.MultiPolygonGeometry
A multipolygon container.
-
Constructor Summary
ConstructorsConstructorDescriptionMultiPolygonGeometry(PolygonGeometryVector geometries) Constructs a MultiPolygonGeometry from the vector of polygons. -
Method Summary
Modifier and TypeMethodDescriptiongetGeometry(int index) Returns the polygon geometry at the specified index.intgetType()Returns what kind of geometry this is.
Without it the only way to tell a MultiPoint from a Point is a downcast, or - from a
scripting binding - matching on the wrapper's class name.Methods inherited from class com.massifmaps.geometry.MultiGeometry
getCenterPos, getGeometryCountMethods inherited from class com.massifmaps.geometry.Geometry
equals, getBounds, getGeoJSON, hashCode
-
Constructor Details
-
MultiPolygonGeometry
Constructs a MultiPolygonGeometry from the vector of polygons.- Parameters:
geometries- The vector of polygon geometries.
-
-
Method Details
-
getType
public int getType()Description copied from class:GeometryReturns what kind of geometry this is.
Without it the only way to tell a MultiPoint from a Point is a downcast, or - from a
scripting binding - matching on the wrapper's class name.- Overrides:
getTypein classMultiGeometry- Returns:
- The geometry type.
-
getGeometry
Returns the polygon geometry at the specified index. Index must be between 0 and getGeometryCount (exclusive)- Overrides:
getGeometryin classMultiGeometry- Parameters:
index- The index of the polygon geometry.- Returns:
- The polygon geometry at specified index.
- Throws:
IndexOutOfBoundsException- If the index is out of range.
-