Class GdalRaster
Defined in File GdalRaster.hpp
Inheritance Relationships
Base Type
public navtk::geospatial::Raster(Class Raster)
Class Documentation
Interface to an GDAL File made up of a rectangular grid of pixels.
Each pixel represents a post; thus, pixel and post can be considered synonymous
Public Functions
Constructor.
- Parameters
filename – the file path
undulation_path – the path to the geoid undulation file for converting between HAE and MSL. The default path of this variable requires setting the NAVTK_DATA_DIR environment variable to the folder containing the undulation file.
Destructor.
Scan the whole dataset tile to store in the cache.
- Returns
Whether raster tile is associated with valid file.
Returns the total number of elements in each line.
- Returns
The number of elements in the line.
Returns the total number of lines available.
- Returns
The number of lines.
Transform the coordinates from wgs84 (lat/lon) to pixel offset.
- Parameters
latitude – Latitude in degrees
longitude – Longitude in degrees
- Returns
The converted coordinates as a pixel offset from the top left of the tile.
Transform the coordinates from pixel offset to wgs84 (lat/lon).
This is the reverse of
wgs84_to_pixel().- Parameters
x_pixel – column offset from top left of tile
y_pixel – row offset from top left of tile
- Returns
The converted coordinates in the form {latitude, longitude}.
Returns a single double representing the elevation at the given pixel index.
- Parameters
idx_x – index of pixel in the line, value should be between 0 and get_width().
idx_y – index of line to read, value should be between 0 and get_height().
- Returns
The elevation at the pixel index, or no_data_value if the requested index is unavailable in the dataset or is out of bounds.
Return a human-readable name for this object.
- Returns
The file name.
Compare the given elevation to the raster’s no data value (a unique value used by the dataset to denote invalid or missing data inside of a tile).
- Parameters
data – The elevation to evaluate.
- Returns
trueif the elevation is valid andfalseif not.
Remove data from memory, if cached.