public class LatitudeLineCoverageGrid extends CentralBodyCoverageGrid
Constructor and Description |
---|
LatitudeLineCoverageGrid()
Construct a default instance representing the equator.
|
LatitudeLineCoverageGrid(CentralBody centralBody,
double latitude,
double minimumLongitude,
double maximumLongitude,
double resolution)
Construct a new instance based on the given central body and longitude bounds.
|
LatitudeLineCoverageGrid(TerrainProvider terrainProvider,
CentralBody centralBody,
double latitude,
double minimumLongitude,
double maximumLongitude,
double resolution)
Construct a new instance based on the given terrain and longitude bounds.
|
Modifier and Type | Method and Description |
---|---|
List<CoverageGridPoint> |
generateGridPoints()
Computes the grid points based on the given set of parameters for the longitude line.
|
double |
getLatitude()
Gets the planetodetic latitude of the line, in radians.
|
double |
getMaximumLongitude()
Gets the east-most longitude of the line, in radians.
|
double |
getMinimumLongitude()
Gets the west-most longitude of the line, in radians.
|
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 |
setLatitude(double value)
Sets the planetodetic latitude of the line, in radians.
|
void |
setMaximumLongitude(double value)
Sets the east-most longitude of the line, in radians.
|
void |
setMinimumLongitude(double value)
Sets the west-most longitude of the line, in radians.
|
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 LatitudeLineCoverageGrid()
The default CentralBody
(get
/ set
) is the EarthCentralBody
in the CentralBodiesFacet
returned from CentralBodiesFacet.getFromContext()
.
The default resolution is 5 degrees. Both SaveGridCell
(get
/ set
) and UseCellSurfaceAreaForWeight
(get
/ set
) are set to true
.
public LatitudeLineCoverageGrid(@Nonnull CentralBody centralBody, double latitude, double minimumLongitude, double maximumLongitude, double resolution)
SaveGridCell
(get
/ set
) and UseCellSurfaceAreaForWeight
(get
/ set
) are set to true
.
The frame is set to the central body's fixed frame and the shape is set to the central body's shape.centralBody
- The central body on which this grid is defined.latitude
- The planetodetic latitude of the line, in radians.minimumLongitude
- The west-most longitude of the line, in radians.maximumLongitude
- The east-most longitude of the line, in radians.resolution
- The requested resolution, in radians, representing an upper bound
to the angular spacing between grid points.ArgumentOutOfRangeException
- Thrown if the latitude is outside the range from -pi/2 to pi/2,
or the resolution is less than or equal to 0.ArgumentNullException
- Thrown when centralBody
is null
.public LatitudeLineCoverageGrid(@Nonnull TerrainProvider terrainProvider, @Nonnull CentralBody centralBody, double latitude, double minimumLongitude, double maximumLongitude, 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, and the provider of the fixed frame used for the grid.centralBody
- The central body on which this grid is defined.latitude
- The planetodetic latitude of the line, in radians.minimumLongitude
- The west-most longitude of the line, in radians.maximumLongitude
- The east-most longitude of the line, in radians.resolution
- The requested resolution, in radians, representing an upper bound
to the angular spacing between grid points.ArgumentOutOfRangeException
- Thrown if the latitude is outside the range from -pi/2 to pi/2,
or the resolution is less than or equal to 0.ArgumentNullException
- Thrown when terrainProvider
or centralBody
is null
.public final double getLatitude()
ArgumentOutOfRangeException
- Thrown if the latitude is set outside the range from -pi/2 to pi/2.public final void setLatitude(double value)
ArgumentOutOfRangeException
- Thrown if the latitude is set outside the range from -pi/2 to pi/2.public final double getMinimumLongitude()
public final void setMinimumLongitude(double value)
public final double getMaximumLongitude()
public final void setMaximumLongitude(double value)
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
.