public class LongitudeLineCoverageGrid extends CentralBodyCoverageGrid
Constructor and Description |
---|
LongitudeLineCoverageGrid()
Construct a default instance representing the prime meridian.
|
LongitudeLineCoverageGrid(CentralBody centralBody,
double longitude,
double minimumLatitude,
double maximumLatitude,
double resolution)
Construct a new instance based on the given central body and latitude bounds.
|
LongitudeLineCoverageGrid(TerrainProvider terrainProvider,
CentralBody centralBody,
double longitude,
double minimumLatitude,
double maximumLatitude,
double resolution)
Construct a new instance based on the given terrain and latitude bounds.
|
LongitudeLineCoverageGrid(TerrainProvider terrainProvider,
double longitude,
double minimumLatitude,
double maximumLatitude,
double resolution)
Construct a new instance based on the given terrain and latitude 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 |
getLongitude()
Gets the longitude of the line, in radians.
|
double |
getMaximumLatitude()
Gets the north-most planetodetic latitude of the line, in radians.
|
double |
getMinimumLatitude()
Gets the south-most planetodetic latitude 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 |
setLongitude(double value)
Sets the longitude of the line, in radians.
|
void |
setMaximumLatitude(double value)
Sets the north-most planetodetic latitude of the line, in radians.
|
void |
setMinimumLatitude(double value)
Sets the south-most planetodetic latitude 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 LongitudeLineCoverageGrid()
The default CentralBody
(get
/ set
) is the EarthCentralBody
in the CentralBodiesFacet
returned from CentralBodiesFacet.getFromContext()
.
The default resolution is 5 degrees. The default reference frame is the Earth's fixed frame. Both SaveGridCell
(get
/ set
) and UseCellSurfaceAreaForWeight
(get
/ set
) are set to true
.
public LongitudeLineCoverageGrid(@Nonnull CentralBody centralBody, double longitude, double minimumLatitude, double maximumLatitude, double resolution)
SaveGridCell
(get
/ set
) and UseCellSurfaceAreaForWeight
(get
/ set
) are set to true
.centralBody
- The central body on which this grid is defined.longitude
- The longitude of the line, in radians.minimumLatitude
- The south-most planetodetic latitude of the line, in radians.maximumLatitude
- The north-most planetodetic latitude 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 either 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 LongitudeLineCoverageGrid(@Nonnull TerrainProvider terrainProvider, double longitude, double minimumLatitude, double maximumLatitude, 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.longitude
- The longitude of the line, in radians.minimumLatitude
- The south-most planetodetic latitude of the line, in radians.maximumLatitude
- The north-most planetodetic latitude 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 either 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
is null
.public LongitudeLineCoverageGrid(@Nonnull TerrainProvider terrainProvider, @Nonnull CentralBody centralBody, double longitude, double minimumLatitude, double maximumLatitude, 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 central body on which this grid is defined.longitude
- The longitude of the line, in radians.minimumLatitude
- The south-most planetodetic latitude of the line, in radians.maximumLatitude
- The north-most planetodetic latitude 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 either latitude is outside the range from -pi/2 to pi/2,
or the resolution is less than or equal to 0.ArgumentNullException
- Thrown if terrainProvider
or centralBody
is null
.public final double getLongitude()
public final void setLongitude(double value)
public final double getMinimumLatitude()
ArgumentOutOfRangeException
- Thrown if the latitude is set outside the range from -pi/2 to pi/2.public final void setMinimumLatitude(double value)
ArgumentOutOfRangeException
- Thrown if the latitude is set outside the range from -pi/2 to pi/2.public final double getMaximumLatitude()
ArgumentOutOfRangeException
- Thrown if the latitude is set outside the range from -pi/2 to pi/2.public final void setMaximumLatitude(double value)
ArgumentOutOfRangeException
- Thrown if the latitude is set outside the range from -pi/2 to pi/2.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 MinimumLatitude
(get
/ set
) is greater than MaximumLatitude
(get
/ set
).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
.