Package org.orekit.rugged.raster
Interface TileUpdater
-
public interface TileUpdater
Interface used to update Digital Elevation Model tiles.Implementations of this interface must be provided by the image processing mission-specific layer, thus allowing the Rugged library to access the Digital Elevation Model data.
- Author:
- Luc Maisonobe, Guylaine Prat
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
updateTile(double latitude, double longitude, UpdatableTile tile)
Update the tile according to the Digital Elevation Model.
-
-
-
Method Detail
-
updateTile
void updateTile(double latitude, double longitude, UpdatableTile tile)
Update the tile according to the Digital Elevation Model.This method is the hook used by the Rugged library to delegate Digital Elevation Model loading to user-provided mission-specific code. When this method is called, the specified
tile
is empty and must be updated by callingtile.setGeometry
once at the start of the method to set up the tile geometry, and then callingtile.setElevation
once for each cell in the tile to set the cell elevation.The implementation must fulfill the requirements:
- The tiles must overlap each other by one cell (i.e. cells that belong to the northernmost row of one tile must also belong to the sourthernmost row of another tile and cells that belong to the easternmost column of one tile must also belong to the westernmost column of another tile).
- As elevations are interpolated within Digital Elevation Model cells using four cells at indices (kLat, kLon), (kLat+1, kLon), (kLat, kLon+1), (kLat+1, kLon+1). A point in the northernmost row (resp. easternmost column) miss neighboring points at row kLat+1 (resp. neighboring points at column kLon+1) and therefore cannot be interpolated. The method should therefore select the northernmost tile if the specified latitude is in the overlapping row between two tiles, and it should select the easternmost tile if the specified longitude is in the overlapping column between two tiles. Failing to do so will trigger an error at caller level mentioning the missing required neighbors.
-
The elevation at cells as set when calling
tile.setElevation(kLat, kLon, elevation)
must be the elevation corresponding to the latitudeminLatitude + kLat * latitudeStep
and longitudeminLongitude + kLon * longitudeStep
, whereminLatitude
,latitudeStep
,minLongitude
andlongitudeStep
correspond to the parameter of thetile.setGeometry(minLatitude, minLongitude, latitudeStep, longitudeStep, latitudeRows, longitudeColumns)
call.
- Parameters:
latitude
- latitude that must be covered by the tile (rad)longitude
- longitude that must be covered by the tile (rad)tile
- to update
-
-