Tile
, UpdatableTile
MinMaxTreeTile
public class SimpleTile extends Object implements Tile
Tile
.SimpleTileFactory
Tile.Location
Modifier | Constructor | Description |
---|---|---|
protected |
SimpleTile() |
Simple constructor.
|
Modifier and Type | Method | Description |
---|---|---|
NormalizedGeodeticPoint |
cellIntersection(org.orekit.bodies.GeodeticPoint p,
org.hipparchus.geometry.euclidean.threed.Vector3D los,
int latitudeIndex,
int longitudeIndex) |
Find the intersection of a line-of-sight and a Digital Elevation Model cell.
|
double |
getElevationAtIndices(int latitudeIndex,
int longitudeIndex) |
Get the elevation of an exact grid point.
|
int |
getFloorLatitudeIndex(double latitude) |
Get the floor latitude index of a point.
|
int |
getFloorLongitudeIndex(double longitude) |
Get the floor longitude index of a point.
|
double |
getLatitudeAtIndex(int latitudeIndex) |
Get the latitude at some index.
|
int |
getLatitudeRows() |
Get number of latitude rows.
|
double |
getLatitudeStep() |
Get step in latitude (size of one raster element).
|
Tile.Location |
getLocation(double latitude,
double longitude) |
Check if a tile covers a ground point.
|
double |
getLongitudeAtIndex(int longitudeIndex) |
Get the longitude at some index.
|
int |
getLongitudeColumns() |
Get number of longitude columns.
|
double |
getLongitudeStep() |
Get step in longitude (size of one raster element).
|
double |
getMaxElevation() |
Get the maximum elevation in the tile.
|
int |
getMaxElevationLatitudeIndex() |
Get the latitude index of max elevation.
|
int |
getMaxElevationLongitudeIndex() |
Get the longitude index of max elevation.
|
double |
getMaximumLatitude() |
Get maximum latitude.
|
double |
getMaximumLongitude() |
Get maximum longitude.
|
double |
getMinElevation() |
Get the minimum elevation in the tile.
|
int |
getMinElevationLatitudeIndex() |
Get the latitude index of min elevation.
|
int |
getMinElevationLongitudeIndex() |
Get the longitude index of min elevation.
|
double |
getMinimumLatitude() |
Get minimum latitude of grid interpolation points.
|
double |
getMinimumLongitude() |
Get minimum longitude.
|
double |
interpolateElevation(double latitude,
double longitude) |
Interpolate elevation.
|
protected void |
processUpdatedElevation(double[] elevationsArray) |
Process elevation array at completion.
|
void |
setElevation(int latitudeIndex,
int longitudeIndex,
double elevation) |
Set the elevation for one raster element.
|
void |
setGeometry(double newMinLatitude,
double newMinLongitude,
double newLatitudeStep,
double newLongitudeStep,
int newLatitudeRows,
int newLongitudeColumns) |
Set the tile global geometry.
|
void |
tileUpdateCompleted() |
Hook called at the end of tile update completion.
|
public void setGeometry(double newMinLatitude, double newMinLongitude, double newLatitudeStep, double newLongitudeStep, int newLatitudeRows, int newLongitudeColumns)
setGeometry
in interface UpdatableTile
newMinLatitude
- minimum latitude (rad)newMinLongitude
- minimum longitude (rad)newLatitudeStep
- step in latitude (size of one raster element) (rad)newLongitudeStep
- step in longitude (size of one raster element) (rad)newLatitudeRows
- number of latitude rowsnewLongitudeColumns
- number of longitude columnspublic void tileUpdateCompleted()
tileUpdateCompleted
in interface Tile
protected void processUpdatedElevation(double[] elevationsArray)
This method is called at tile update completion, it is expected to be overridden by subclasses. The default implementation does nothing.
elevationsArray
- elevations arraypublic double getMinimumLatitude()
getMinimumLatitude
in interface Tile
public double getLatitudeAtIndex(int latitudeIndex)
getLatitudeAtIndex
in interface Tile
latitudeIndex
- latitude indexpublic double getMaximumLatitude()
Beware that as a point at maximum latitude is the northernmost
one of the grid, it doesn't have a northwards neighbor and
therefore calling getLocation
on such a latitude will return either Tile.Location.NORTH_WEST
,
Tile.Location.NORTH
or Tile.Location.NORTH_EAST
, but can
never return Tile.Location.HAS_INTERPOLATION_NEIGHBORS
!
getMaximumLatitude
in interface Tile
public double getMinimumLongitude()
getMinimumLongitude
in interface Tile
public double getLongitudeAtIndex(int longitudeIndex)
getLongitudeAtIndex
in interface Tile
longitudeIndex
- longitude indexpublic double getMaximumLongitude()
Beware that as a point at maximum longitude is the easternmost
one of the grid, it doesn't have an eastwards neighbor and
therefore calling getLocation
on such a longitude will return either Tile.Location.SOUTH_EAST
,
Tile.Location.EAST
or Tile.Location.NORTH_EAST
, but can
never return Tile.Location.HAS_INTERPOLATION_NEIGHBORS
!
getMaximumLongitude
in interface Tile
public double getLatitudeStep()
getLatitudeStep
in interface Tile
public double getLongitudeStep()
getLongitudeStep
in interface Tile
public int getLatitudeRows()
getLatitudeRows
in interface Tile
public int getLongitudeColumns()
getLongitudeColumns
in interface Tile
public double getMinElevation()
getMinElevation
in interface Tile
public int getMinElevationLatitudeIndex()
getMinElevationLatitudeIndex
in interface Tile
public int getMinElevationLongitudeIndex()
getMinElevationLongitudeIndex
in interface Tile
public double getMaxElevation()
getMaxElevation
in interface Tile
public int getMaxElevationLatitudeIndex()
getMaxElevationLatitudeIndex
in interface Tile
public int getMaxElevationLongitudeIndex()
getMaxElevationLongitudeIndex
in interface Tile
public void setElevation(int latitudeIndex, int longitudeIndex, double elevation)
BEWARE! The order of the indices follows geodetic conventions, i.e. the latitude is given first and longitude afterwards, so the first index specifies a row index with zero at South and max value at North, and the second index specifies a column index with zero at West and max value at East. This is not the same as some raster conventions (as our row index increases from South to North) and this is also not the same as Cartesian coordinates as our ordinate index appears before our abscissa index).
setElevation
in interface UpdatableTile
latitudeIndex
- index of latitude (row index)longitudeIndex
- index of longitude (column index)elevation
- elevation (m)public double getElevationAtIndices(int latitudeIndex, int longitudeIndex)
getElevationAtIndices
in interface Tile
latitudeIndex
- grid point index along latitudelongitudeIndex
- grid point index along longitudepublic double interpolateElevation(double latitude, double longitude)
In order to cope with numerical accuracy issues when computing points at tile boundary, a slight tolerance (typically 1/8 cell) around the tile is allowed. Elevation can therefore be interpolated (really extrapolated in this case) even for points slightly overshooting tile boundaries, using the closest tile cell. Attempting to interpolate too far from the tile will trigger an exception.
This classes uses an arbitrary 1/8 cell tolerance for interpolating slightly out of tile points.
interpolateElevation
in interface Tile
latitude
- ground point latitudelongitude
- ground point longitudepublic NormalizedGeodeticPoint cellIntersection(org.orekit.bodies.GeodeticPoint p, org.hipparchus.geometry.euclidean.threed.Vector3D los, int latitudeIndex, int longitudeIndex)
cellIntersection
in interface Tile
p
- point on the linelos
- line-of-sight, in the topocentric frame (East, North, Zenith) of the point,
scaled to match radians in the horizontal plane and meters along the vertical axislatitudeIndex
- latitude index of the Digital Elevation Model celllongitudeIndex
- longitude index of the Digital Elevation Model cellpublic int getFloorLatitudeIndex(double latitude)
The specified latitude is always between index and index+1.
getFloorLatitudeIndex
in interface Tile
latitude
- geodetic latitudepublic int getFloorLongitudeIndex(double longitude)
The specified longitude is always between index and index+1.
getFloorLongitudeIndex
in interface Tile
longitude
- geodetic longitudepublic Tile.Location getLocation(double latitude, double longitude)
getLocation
in interface Tile
latitude
- ground point latitudelongitude
- ground point longitudeCopyright © 2014-2019 CS Systèmes d'information. All rights reserved.