Package org.eclipse.mosaic.lib.geo
Class GeoPolygon
- java.lang.Object
-
- org.eclipse.mosaic.lib.geo.GeoPolygon
-
-
Constructor Summary
Constructors Constructor Description GeoPolygon(List<GeoPoint> coordinates)
Construct a newGeoPolygon
.GeoPolygon(GeoPoint... coordinates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(GeoPoint point)
Checks whether this area contains the given point.boolean
equals(Object o)
Bounds<GeoPoint>
getBounds()
Calculates and returns the bounding box of this area.List<GeoPoint>
getVertices()
int
hashCode()
CartesianPolygon
toCartesian()
Converts this area forGeoPoint
to an equivalent area forCartesianPoint
.
-
-
-
Constructor Detail
-
GeoPolygon
public GeoPolygon(GeoPoint... coordinates)
-
GeoPolygon
public GeoPolygon(List<GeoPoint> coordinates)
Construct a newGeoPolygon
.- Parameters:
coordinates
- A list of lists ofGeoPoint
s
-
-
Method Detail
-
getVertices
public List<GeoPoint> getVertices()
- Specified by:
getVertices
in interfacePolygon<GeoPoint>
-
getBounds
public Bounds<GeoPoint> getBounds()
Description copied from interface:Area
Calculates and returns the bounding box of this area.
-
contains
public boolean contains(GeoPoint point)
Description copied from interface:Area
Checks whether this area contains the given point.
-
toCartesian
public CartesianPolygon toCartesian()
Description copied from interface:GeoArea
Converts this area forGeoPoint
to an equivalent area forCartesianPoint
.- Specified by:
toCartesian
in interfaceGeoArea
- Returns:
- the equivalent area based on
CartesianPoint
-
-