Class Tile
Defined in File Tile.hpp
Nested Relationships
Nested Types
Class Documentation
This class represents a valid GDAL tile.
Public Functions
Constructor.
- Parameters
filename – the Gdal file path
Scan the whole dataset tile to store in the cache.
Check whether the tile has a valid file.
- Returns
Whether raster tile is associated with valid file.
Check if the tile is rotated in map space.
- Returns
Whether the tile is rotated.
Check if a tile is currently cached.
- Returns
Cached state of the tile.
Gets the elevation from a GDAL tile.
- Parameters
map_coords – coordinate in map space.
- Returns
found elevation. Note that this function does not perform a bounds check, as the
GdalSourceconfirms that the coordinates are in bounds before trying to look up the datum. If an out of bound map coordinate is provided, it will return the closest elevation contained in the tile. If data is missing from the nearest pixels in the tile, it will return NAN.
Gets the elevations from a GDAL tile.
- Parameters
map_coords – batch of coordinates in map space.
- Returns
A vector of elevations.
Check if the given coordinates are in the bounds of this tile.
- Parameters
map_coords – coordinates in map space
- Returns
trueif the given coordinates are in the tile.
Check if the given set of coordinates are in the bounds of this tile.
- Parameters
map_coords – batch of N coordinates in map space.
search_mask – optional mask of length N, where indices of coordinates to look for are true. If an index is false,
containswill ignore that index, even if it is contained in the tile. This parameter exists to improve performance by avoiding unnecessary checks when a coordinate may have already been found in another Tile. This is faster than passing in only the set of Coordinates to search for, which would require substantial memory re-allocation.
- Returns
indices of coordinates in
map_coordscontained in tile.
Remove the tile data from memory, if cached.
Return a human-readable name for this object.
- Returns
The file name.
Returns the total number of pixels in each line.
- Returns
The number of pixels in the line.
Returns the total number of lines in the dataset object (i.e.
in the file).
- Returns
The number of lines.
Get transformation from wgs84 to map for this tile.
- Returns
pointer to transformation
Get transformation from map to wgs84 for this tile.
- Returns
pointer to transformation
Transform coordinates in map space into the pixel space of this particular tile.
- Parameters
map_coords – coordinates in map space
- Returns
the projected pixel coordinates for this tile
Transform a batch of coordinates in map space into the pixel space of this particular tile.
- Parameters
map_coords – a batch of coordinates in map space
- Returns
the projected batch of pixel coordinates for this tile
Transform coordinates in the pixel space of this particular tile into map space.
- Parameters
pixel_coords – coordinates in the pixel space of this tile
- Returns
the projected map coordinates
Transform a batch of coordinates in the pixel space of this particular tile into map space.
- Parameters
pixel_coords – a batch of coordinates in the pixel space of this tile
- Returns
the projected batch of map coordinates
Friends
Overload insertion operator to print the tile’s data.
- Parameters
os – the
ostreamobjecttile – the tile to print
- Returns
The output stream
os.