Package mil.nga.sf.geojson
Class MultiPolygon
- java.lang.Object
-
- mil.nga.sf.geojson.GeoJsonObject
-
- mil.nga.sf.geojson.Geometry
-
- mil.nga.sf.geojson.MultiPolygon
-
- All Implemented Interfaces:
Serializable
public class MultiPolygon extends Geometry
Multi Polygon- Author:
- yutzlejp
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultiPolygon()ConstructorMultiPolygon(List<Polygon> polygons)ConstructorMultiPolygon(MultiPolygon multiPolygon)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static MultiPolygonfromCoordinates(List<List<List<Position>>> coordinates)Create a multi polygon from coordinatesList<List<List<Position>>>getCoordinates()Returns coordinates as a GeoJSON Position listGeometrygetGeometry()Get the simple geometryGeometryTypegetGeometryType()Get the geometry typeMultiPolygongetMultiPolygon()Get the simple features multi polygonList<Polygon>getPolygons()Get the polygonsinthashCode()voidsetCoordinates(List<List<List<Position>>> coordinates)Sets the coordinates from a GeoJSON Position listvoidsetMultiPolygon(MultiPolygon multiPolygon)Set the simple features multi polygonvoidsetPolygons(List<Polygon> polygons)Set the polygons-
Methods inherited from class mil.nga.sf.geojson.Geometry
getSimpleGeometry, getType
-
Methods inherited from class mil.nga.sf.geojson.GeoJsonObject
getBbox, getForeignMember, getForeignMembers, hasForeignMember, hasForeignMembers, setBbox, setForeignMember
-
-
-
-
Constructor Detail
-
MultiPolygon
public MultiPolygon()
Constructor
-
MultiPolygon
public MultiPolygon(List<Polygon> polygons)
Constructor- Parameters:
polygons- polygon list- Since:
- 3.0.0
-
MultiPolygon
public MultiPolygon(MultiPolygon multiPolygon)
Constructor- Parameters:
multiPolygon- simple multi polygon
-
-
Method Detail
-
fromCoordinates
public static MultiPolygon fromCoordinates(List<List<List<Position>>> coordinates)
Create a multi polygon from coordinates- Parameters:
coordinates- coordinates- Returns:
- multi polygon
- Since:
- 3.0.0
-
getGeometryType
public GeometryType getGeometryType()
Get the geometry type- Specified by:
getGeometryTypein classGeometry- Returns:
- geometry type
-
getGeometry
public Geometry getGeometry()
Get the simple geometry- Specified by:
getGeometryin classGeometry- Returns:
- simple geometry
-
getCoordinates
public List<List<List<Position>>> getCoordinates()
Returns coordinates as a GeoJSON Position list- Returns:
- the coordinates
-
setCoordinates
public void setCoordinates(List<List<List<Position>>> coordinates)
Sets the coordinates from a GeoJSON Position list- Parameters:
coordinates- coordinates- Since:
- 3.0.0
-
getPolygons
public List<Polygon> getPolygons()
Get the polygons- Returns:
- list of polygons
- Since:
- 3.0.0
-
setPolygons
public void setPolygons(List<Polygon> polygons)
Set the polygons- Parameters:
polygons- list of polygons- Since:
- 3.0.0
-
getMultiPolygon
public MultiPolygon getMultiPolygon()
Get the simple features multi polygon- Returns:
- multi polygon
- Since:
- 3.0.0
-
setMultiPolygon
public void setMultiPolygon(MultiPolygon multiPolygon)
Set the simple features multi polygon- Parameters:
multiPolygon- multi polygon- Since:
- 3.0.0
-
hashCode
public int hashCode()
- Overrides:
hashCodein classGeoJsonObject
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classGeoJsonObject
-
-