- java.lang.Object
-
- org.arakhne.afc.gis.location.AbstractGeoLocation
-
- org.arakhne.afc.gis.location.GeoLocationArea
-
- All Implemented Interfaces:
Comparable<GeoLocation>,GeoLocation
public final class GeoLocationArea extends AbstractGeoLocation
Describes a geo-localized feature.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:53
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- giscore
-
-
Constructor Summary
Constructors Constructor Description GeoLocationArea(double x1, double y1, double x2, double y2)Constructor.GeoLocationArea(Shape2d<?> area)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetHeight()Replies the height of the area.floatgetMaxX()Replies the x coordinate of the upper-right corner.floatgetMaxY()Replies the y coordinate of the upper-right corner.floatgetMinX()Replies the x coordinate of the lower-left corner.floatgetMinY()Replies the y coordinate of the lower-left corner.floatgetWidth()Replies the width of the area.floatgetX()Replies the x coordinate of the lower-left corner.floatgetY()Replies the y coordinate of the lower-left corner.inthashCode()Rectangle2dtoBounds2D()Replies the area cover by this location.GeodesicPositiontoGeodesicPosition()Replies the WSG84 (GPS) representation of this point.GeoIdtoGeoId()Replies the GeoId representation of the geo-location.-
Methods inherited from class org.arakhne.afc.gis.location.AbstractGeoLocation
compareTo, equals, toString, toUUID
-
-
-
-
Constructor Detail
-
GeoLocationArea
public GeoLocationArea(double x1, double y1, double x2, double y2)Constructor.- Parameters:
x1- x coordinate of the first area corner.y1- y coordinate of the first area corner.x2- x coordinate of the second area corner.y2- y coordinate of the second area corner.
-
GeoLocationArea
public GeoLocationArea(Shape2d<?> area)
Constructor.- Parameters:
area- the area specification.
-
-
Method Detail
-
toGeoId
@Pure public GeoId toGeoId()
Description copied from interface:GeoLocationReplies the GeoId representation of the geo-location.- Returns:
- the GeoId representation of this location
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCodein classAbstractGeoLocation
-
getMinX
@Pure public float getMinX()
Replies the x coordinate of the lower-left corner.- Returns:
- the minimum x
-
getMinY
@Pure public float getMinY()
Replies the y coordinate of the lower-left corner.- Returns:
- the minimum y
-
getX
@Pure public float getX()
Replies the x coordinate of the lower-left corner.- Returns:
- the minimum x
-
getY
@Pure public float getY()
Replies the y coordinate of the lower-left corner.- Returns:
- the minimum y
-
getMaxX
@Pure public float getMaxX()
Replies the x coordinate of the upper-right corner.- Returns:
- the maximum x
-
getMaxY
@Pure public float getMaxY()
Replies the y coordinate of the upper-right corner.- Returns:
- the maximum y
-
getWidth
@Pure public float getWidth()
Replies the width of the area.- Returns:
- the width
-
getHeight
@Pure public float getHeight()
Replies the height of the area.- Returns:
- the height
-
toBounds2D
@Pure public Rectangle2d toBounds2D()
Description copied from interface:GeoLocationReplies the area cover by this location.- Returns:
- the bounds
-
toGeodesicPosition
@Pure public GeodesicPosition toGeodesicPosition()
Description copied from interface:GeoLocationReplies the WSG84 (GPS) representation of this point.If this GeoLocation is not a point, the implementation class should provides a significant GPS point.
- Returns:
- the WSG84 (GPS) representation of this point; or
nullif the GPS point could not be computed.
-
-