Interface Tile
-
- All Superinterfaces:
UpdatableTile
- All Known Implementing Classes:
MinMaxTreeTile,SimpleTile
public interface Tile extends UpdatableTile
Interface representing a raster tile.The elevations are considered to be at the center of each cells. The minimum latitude and longitude hence correspond to the center of the most South-West cell, and the maximum latitude and longitude correspond to the center of the most North-East cell.
- Author:
- Luc Maisonobe, Guylaine Prat
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTile.LocationEnumerate for point location with respect to the interpolation grid of a tile.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NormalizedGeodeticPointcellIntersection(NormalizedGeodeticPoint p, Vector3D los, int latitudeIndex, int longitudeIndex)Find the intersection of a line-of-sight and a Digital Elevation Model cell.doublegetElevationAtIndices(int latitudeIndex, int longitudeIndex)Get the elevation of an exact grid point.intgetFloorLatitudeIndex(double latitude)Get the floor latitude index of a point.intgetFloorLongitudeIndex(double longitude)Get the floor longitude index of a point.doublegetLatitudeAtIndex(int latitudeIndex)Get the latitude at some index.intgetLatitudeRows()Get number of latitude rows.doublegetLatitudeStep()Get step in latitude (size of one raster element).Tile.LocationgetLocation(double latitude, double longitude)Check if a tile covers a ground point.doublegetLongitudeAtIndex(int longitudeIndex)Get the longitude at some index.intgetLongitudeColumns()Get number of longitude columns.doublegetLongitudeStep()Get step in longitude (size of one raster element).doublegetMaxElevation()Get the maximum elevation in the tile.intgetMaxElevationLatitudeIndex()Get the latitude index of max elevation.intgetMaxElevationLongitudeIndex()Get the longitude index of max elevation.doublegetMaximumLatitude()Get maximum latitude.doublegetMaximumLongitude()Get maximum longitude.doublegetMinElevation()Get the minimum elevation in the tile.intgetMinElevationLatitudeIndex()Get the latitude index of min elevation.intgetMinElevationLongitudeIndex()Get the longitude index of min elevation.doublegetMinimumLatitude()Get minimum latitude of grid interpolation points.doublegetMinimumLongitude()Get minimum longitude.doubleinterpolateElevation(double latitude, double longitude)Interpolate elevation.voidtileUpdateCompleted()Hook called at the end of tile update completion.-
Methods inherited from interface org.orekit.rugged.raster.UpdatableTile
setElevation, setGeometry
-
-
-
-
Method Detail
-
tileUpdateCompleted
void tileUpdateCompleted()
Hook called at the end of tile update completion.
-
getMinimumLatitude
double getMinimumLatitude()
Get minimum latitude of grid interpolation points.- Returns:
- minimum latitude of grid interpolation points (rad) (latitude of the center of the cells of South row)
-
getLatitudeAtIndex
double getLatitudeAtIndex(int latitudeIndex)
Get the latitude at some index.- Parameters:
latitudeIndex- latitude index- Returns:
- latitude at the specified index (rad) (latitude of the center of the cells of specified row)
-
getMaximumLatitude
double getMaximumLatitude()
Get maximum latitude.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
getLocationon such a latitude will return eitherTile.Location.NORTH_WEST,Tile.Location.NORTHorTile.Location.NORTH_EAST, but can never returnTile.Location.HAS_INTERPOLATION_NEIGHBORS!- Returns:
- maximum latitude (rad) (latitude of the center of the cells of North row)
-
getMinimumLongitude
double getMinimumLongitude()
Get minimum longitude.- Returns:
- minimum longitude (rad) (longitude of the center of the cells of West column)
-
getLongitudeAtIndex
double getLongitudeAtIndex(int longitudeIndex)
Get the longitude at some index.- Parameters:
longitudeIndex- longitude index- Returns:
- longitude at the specified index (rad) (longitude of the center of the cells of specified column)
-
getMaximumLongitude
double getMaximumLongitude()
Get maximum longitude.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
getLocationon such a longitude will return eitherTile.Location.SOUTH_EAST,Tile.Location.EASTorTile.Location.NORTH_EAST, but can never returnTile.Location.HAS_INTERPOLATION_NEIGHBORS!- Returns:
- maximum longitude (rad) (longitude of the center of the cells of East column)
-
getLatitudeStep
double getLatitudeStep()
Get step in latitude (size of one raster element).- Returns:
- step in latitude (rad)
-
getLongitudeStep
double getLongitudeStep()
Get step in longitude (size of one raster element).- Returns:
- step in longitude (rad)
-
getLatitudeRows
int getLatitudeRows()
Get number of latitude rows.- Returns:
- number of latitude rows
-
getLongitudeColumns
int getLongitudeColumns()
Get number of longitude columns.- Returns:
- number of longitude columns
-
getFloorLatitudeIndex
int getFloorLatitudeIndex(double latitude)
Get the floor latitude index of a point.The specified latitude is always between index and index+1.
- Parameters:
latitude- geodetic latitude- Returns:
- floor latitude index (it may lie outside of the tile!)
-
getFloorLongitudeIndex
int getFloorLongitudeIndex(double longitude)
Get the floor longitude index of a point.The specified longitude is always between index and index+1.
- Parameters:
longitude- geodetic longitude- Returns:
- floor longitude index (it may lie outside of the tile!)
-
getMinElevation
double getMinElevation()
Get the minimum elevation in the tile.- Returns:
- minimum elevation in the tile (m)
-
getMinElevationLatitudeIndex
int getMinElevationLatitudeIndex()
Get the latitude index of min elevation.- Returns:
- latitude index of min elevation
-
getMinElevationLongitudeIndex
int getMinElevationLongitudeIndex()
Get the longitude index of min elevation.- Returns:
- longitude index of min elevation
-
getMaxElevation
double getMaxElevation()
Get the maximum elevation in the tile.- Returns:
- maximum elevation in the tile (m)
-
getMaxElevationLatitudeIndex
int getMaxElevationLatitudeIndex()
Get the latitude index of max elevation.- Returns:
- latitude index of max elevation
-
getMaxElevationLongitudeIndex
int getMaxElevationLongitudeIndex()
Get the longitude index of max elevation.- Returns:
- longitude index of max elevation
-
getElevationAtIndices
double getElevationAtIndices(int latitudeIndex, int longitudeIndex)Get the elevation of an exact grid point.- Parameters:
latitudeIndex- grid point index along latitudelongitudeIndex- grid point index along longitude- Returns:
- elevation at grid point (m)
-
interpolateElevation
double interpolateElevation(double latitude, double longitude)Interpolate elevation.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.
- Parameters:
latitude- ground point latitudelongitude- ground point longitude- Returns:
- interpolated elevation (m)
-
cellIntersection
NormalizedGeodeticPoint cellIntersection(NormalizedGeodeticPoint p, Vector3D los, int latitudeIndex, int longitudeIndex)
Find the intersection of a line-of-sight and a Digital Elevation Model cell.Beware that for continuity reasons, the point argument in
cellIntersectionis normalized with respect to other points used by the caller. This implies that the longitude may be outside of the [-π ; +π] interval (or the [0 ; 2π] interval, depending on the DEM). In particular, when a Line Of Sight crosses the antimeridian at ±π longitude, the library may call thecellIntersectionmethod with a point having a longitude of -π-ε to ensure this continuity. As tiles are stored with longitude clipped to a some DEM specific interval (either [-π ; +π] or [0 ; 2π]), implementations MUST take care to clip the input point back to the tile interval usingMathUtils.normalizeAngle(p.getLongitude(), someLongitudeWithinTheTile). The output point normalization should also be made consistent with the current tile.- Parameters:
p- point on the line (beware its longitude is not normalized with respect to tile)los- 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 cell- Returns:
- point corresponding to line-of-sight crossing the Digital Elevation Model surface if it lies within the cell, null otherwise
-
getLocation
Tile.Location getLocation(double latitude, double longitude)
Check if a tile covers a ground point.- Parameters:
latitude- ground point latitudelongitude- ground point longitude- Returns:
- location of the ground point with respect to tile
-
-