Package gov.nasa.worldwind.geom
Interface MeasurableArea
-
- All Known Subinterfaces:
SurfaceShape
- All Known Implementing Classes:
AbstractSurfaceShape,AreaMeasurer,DirectedSurfacePolyline,KMLSurfacePolygonImpl,SectorSelector.RegionShape,SurfaceBox,SurfaceCircle,SurfaceEllipse,SurfaceMultiPolygon,SurfacePolygon,SurfacePolygons,SurfacePolyline,SurfacePolylines,SurfaceQuad,SurfaceSector,SurfaceSquare
public interface MeasurableAreaThis interfaces provides methods to query measurements of surface-defining objects. These methods all require a Globe parameter in order to compute their spatial location, and for terrain-confoming objects, the terrain elevations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublegetArea(Globe globe)Returns the object's area in square meters.doublegetHeight(Globe globe)Returns the latitudanl length of the object in meters.doublegetPerimeter(Globe globe)Returns the length of the object's perimeter in meters.doublegetWidth(Globe globe)Returns the longitudinal length of the object in meters.
-
-
-
Method Detail
-
getArea
double getArea(Globe globe)
Returns the object's area in square meters. If the object conforms to terrain, the area returned is the surface area of the terrain, including its hillsides and other undulations.- Parameters:
globe- The globe the object is related to.- Returns:
- the object's area in square meters. Returns -1 if the object does not form an area due to an insufficient number of vertices or any other condition.
- Throws:
java.lang.IllegalArgumentException- if theglobeis null.
-
getPerimeter
double getPerimeter(Globe globe)
Returns the length of the object's perimeter in meters. If the object conforms to terrain, the perimeter is that along the terrain, including its hillsides and other undulations.- Parameters:
globe- The globe the object is related to.- Returns:
- the object's perimeter in meters. Returns -1 if the object does not form an area due to an insufficient number of vertices or any other condition.
- Throws:
java.lang.IllegalArgumentException- if theglobeis null.
-
getWidth
double getWidth(Globe globe)
Returns the longitudinal length of the object in meters. The length is the distance from the object's west-most point to its east-most. If the object is terrain conforming then the- Parameters:
globe- The globe the object is related to.- Returns:
- the width of the object in meters.
- Throws:
java.lang.IllegalArgumentException- if theglobeis null.
-
getHeight
double getHeight(Globe globe)
Returns the latitudanl length of the object in meters. The length is the distance from the objects south-most point to its east-most position.- Parameters:
globe- The globe the object is related to.- Returns:
- the height of the object in meters.
- Throws:
java.lang.IllegalArgumentException- if theglobeis null.
-
-