public class GlobalCoverageGrid extends CentralBodyCoverageGrid
Constructor and Description |
---|
GlobalCoverageGrid()
Construct a new default instance based on Earth at 5 degrees (approximately 0.087 radians) resolution.
|
GlobalCoverageGrid(CentralBody centralBody,
double resolution)
Initializes a new instance based on the given central body, in the central body's fixed frame at the input resolution.
|
GlobalCoverageGrid(TerrainProvider terrainProvider,
CentralBody centralBody,
double resolution)
Initializes a new instance based on the given terrain.
|
GlobalCoverageGrid(TerrainProvider terrainProvider,
double resolution)
Initializes a new instance based on the given terrain.
|
Modifier and Type | Method and Description |
---|---|
List<CoverageGridPoint> |
generateGridPoints()
Produces the grid points based on the given set of parameters for the global grid.
|
double |
getResolution()
Gets the requested resolution, in radians, representing the maximum angular spacing between grid points.
|
boolean |
getSaveGridCell()
Gets a value indicating whether the grid should save grid cell information.
|
boolean |
getUseCellSurfaceAreaForWeight()
Gets a value indicating whether to use the surface area of the grid cells as the weight for each point, otherwise a value of 1 is used.
|
void |
setResolution(double value)
Sets the requested resolution, in radians, representing the maximum angular spacing between grid points.
|
void |
setSaveGridCell(boolean value)
Sets a value indicating whether the grid should save grid cell information.
|
void |
setUseCellSurfaceAreaForWeight(boolean value)
Sets a value indicating whether to use the surface area of the grid cells as the weight for each point, otherwise a value of 1 is used.
|
getCentralBody, getGridCellBoundaries, getGridCellBoundary, getHeightRelativeToSurface, getReferenceFrame, getReferenceTerrain, setCentralBody, setReferenceTerrain
public GlobalCoverageGrid()
The default CentralBody
(get
/ set
) is the EarthCentralBody
acquired via CentralBodiesFacet.getFromContext()
.
The default resolution is 5 degrees (approximately 0.087 radians). Both SaveGridCell
(get
/ set
) and UseCellSurfaceAreaForWeight
(get
/ set
) are set to true
.
public GlobalCoverageGrid(@Nonnull CentralBody centralBody, double resolution)
SaveGridCell
(get
/ set
) and UseCellSurfaceAreaForWeight
(get
/ set
) are set to true
.centralBody
- The CentralBody
(get
/ set
) representing the globe.resolution
- The requested resolution, in radians, representing an upper bound
to the angular spacing between grid points.ArgumentOutOfRangeException
- Thrown if the resolution is set to less than or equal to 0.public GlobalCoverageGrid(@Nonnull TerrainProvider terrainProvider, double resolution)
SaveGridCell
(get
/ set
) and UseCellSurfaceAreaForWeight
(get
/ set
) are set to true
.terrainProvider
- The TerrainProvider
used to generate the height of the grid points.resolution
- The requested resolution, in radians, representing an upper bound
to the angular spacing between grid points.ArgumentOutOfRangeException
- Thrown if the resolution is set to less than or equal to 0.ArgumentNullException
- Thrown when terrainProvider
is null
.public GlobalCoverageGrid(@Nonnull TerrainProvider terrainProvider, @Nonnull CentralBody centralBody, double resolution)
SaveGridCell
(get
/ set
) and UseCellSurfaceAreaForWeight
(get
/ set
) are set to true
.terrainProvider
- The TerrainProvider
used to generate the height of the grid points.centralBody
- The CentralBody
(get
/ set
) representing the globe.resolution
- The requested resolution, in radians, representing an upper bound
to the angular spacing between grid points.ArgumentOutOfRangeException
- Thrown if the resolution is set to less than or equal to 0.ArgumentNullException
- Thrown if terrainProvider
or centralBody
is null
.public final double getResolution()
ArgumentOutOfRangeException
- Thrown if the resolution is set to less than or equal to 0.public final void setResolution(double value)
ArgumentOutOfRangeException
- Thrown if the resolution is set to less than or equal to 0.public final boolean getUseCellSurfaceAreaForWeight()
public final void setUseCellSurfaceAreaForWeight(boolean value)
public final boolean getSaveGridCell()
public final void setSaveGridCell(boolean value)
public List<CoverageGridPoint> generateGridPoints()
If ReferenceTerrain
(get
/ set
) is configured, the heights of the grid points are determined by that TerrainProvider
.
Note that the type of Point
used for the location in the returned GridPoints
are PointCartographic
.
generateGridPoints
in interface ICoverageGrid
generateGridPoints
in class CentralBodyCoverageGrid
IllegalStateException
- Thrown if ReferenceTerrain
(get
/ set
) is configured and
its shape doesn't match CentralBody
(get
/ set
) shape.PropertyInvalidException
- Thrown if ReferenceFrame
(get
) or CentralBody
(get
/ set
) is null
.