public final class SurfaceRegionsCoverageGrid extends CentralBodyCoverageGrid
Constructor and Description |
---|
SurfaceRegionsCoverageGrid(double resolution,
CentralBody centralBody,
EllipsoidSurfaceRegion... regions)
Create a new instance based on a given resolution and a set of polygonal regions.
|
SurfaceRegionsCoverageGrid(double resolution,
CentralBody centralBody,
Iterable<? extends EllipsoidSurfaceRegion> regions)
Create a new instance based on a given resolution and a set of polygonal regions.
|
SurfaceRegionsCoverageGrid(double resolution,
TerrainProvider terrainProvider,
CentralBody centralBody,
EllipsoidSurfaceRegion... regions)
Create a new instance based on a given
TerrainProvider , resolution and a set of polygonal regions. |
SurfaceRegionsCoverageGrid(double resolution,
TerrainProvider terrainProvider,
CentralBody centralBody,
Iterable<? extends EllipsoidSurfaceRegion> regions)
Create a new instance based on a given
TerrainProvider , resolution and a set of polygonal regions. |
Modifier and Type | Method and Description |
---|---|
List<CoverageGridPoint> |
generateGridPoints()
Generate a list of regularly spaced grid points inside the specified
Regions (get ). |
List<EllipsoidSurfaceRegion> |
getRegions()
Gets a read-only collection of surface regions which define this 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 is to 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 is to 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 SurfaceRegionsCoverageGrid(double resolution, @Nonnull CentralBody centralBody, @Nonnull Iterable<? extends EllipsoidSurfaceRegion> regions)
SaveGridCell
(get
/ set
) and UseCellSurfaceAreaForWeight
(get
/ set
) are set to true
.resolution
- The resolution, in radians, representing the requested spacing between grid points.centralBody
- The central body on which the grid is defined.regions
- The set of polygonal regions which define the grid.IllegalStateException
- Thrown if the ReferenceSurfaces of the EllipsoidSurfaceRegions conflict.ArgumentOutOfRangeException
- Thrown if the resolution is set to less than or equal to 0.ArgumentNullException
- Thrown if regions
or centralBody
is null
.public SurfaceRegionsCoverageGrid(double resolution, @Nonnull CentralBody centralBody, @Nonnull EllipsoidSurfaceRegion... regions)
SaveGridCell
(get
/ set
) and UseCellSurfaceAreaForWeight
(get
/ set
) are set to true
.resolution
- The resolution, in radians, representing the requested spacing between grid points.centralBody
- The central body on which the grid is defined. The fixed frame of this body is used for the reference frame.regions
- The set of polygonal regions which define the grid.IllegalStateException
- Thrown if the ReferenceSurfaces of the EllipsoidSurfaceRegions conflict.ArgumentOutOfRangeException
- Thrown if the resolution is set to less than or equal to 0.ArgumentNullException
- Thrown if centralBody
or regions
is null
.public SurfaceRegionsCoverageGrid(double resolution, @Nonnull TerrainProvider terrainProvider, @Nonnull CentralBody centralBody, @Nonnull EllipsoidSurfaceRegion... regions)
TerrainProvider
, resolution and a set of polygonal regions. Both 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 resolution, in radians, representing the requested spacing between grid points.centralBody
- The central body for this grid.regions
- The set of polygonal regions which define the grid.IllegalStateException
- Thrown if the ReferenceSurfaces of the TerrainProvider conflict with the EllipsoidSurfaceRegions conflict.ArgumentOutOfRangeException
- Thrown if the resolution is set to less than or equal to 0.ArgumentNullException
- Thrown if terrainProvider
, centralBody
, or regions
is null
.public SurfaceRegionsCoverageGrid(double resolution, @Nonnull TerrainProvider terrainProvider, @Nonnull CentralBody centralBody, @Nonnull Iterable<? extends EllipsoidSurfaceRegion> regions)
TerrainProvider
, resolution and a set of polygonal regions. Both 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 resolution, in radians, representing the requested spacing between grid points.centralBody
- The central body for this grid.regions
- The set of polygonal regions which define the grid.IllegalStateException
- Thrown if the ReferenceSurfaces of the TerrainProvider conflict with the EllipsoidSurfaceRegions conflict.ArgumentOutOfRangeException
- Thrown if the resolution is set to less than or equal to 0.ArgumentNullException
- Thrown if regions
, terrainProvider
, or centralBody
is null
.@Nonnull public final List<EllipsoidSurfaceRegion> getRegions()
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()
Regions
(get
). This grid first computes a region that bounds all of the input Regions
(get
). The algorithm then
grids this region, adjusting the resolution upwards slightly in order to evenly divide each coordinate's angular span. Points in this bounding region are then kept if they lie within one of the input regions.
If a TerrainProvider
is present, the vertex heights are found using it as well.
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
.