pub trait ElevationSource: Sync {
// Required methods
fn wgs84_bounds(&self) -> (f64, f64, f64, f64);
fn elevation_range(&self) -> Option<(f32, f32)>;
fn source_epsg(&self) -> u32;
fn patches(
&self,
bounds: (f64, f64, f64, f64),
metres_per_pixel: f64,
) -> Result<Vec<Cow<'_, Dem>>, GeolithError>;
}Expand description
Elevation data the terrain tiler samples per output tile.
Required Methods§
Sourcefn elevation_range(&self) -> Option<(f32, f32)>
fn elevation_range(&self) -> Option<(f32, f32)>
Minimum and maximum valid elevation, or None when fully nodata.
Sourcefn source_epsg(&self) -> u32
fn source_epsg(&self) -> u32
EPSG code recorded in the archive metadata.
Sourcefn patches(
&self,
bounds: (f64, f64, f64, f64),
metres_per_pixel: f64,
) -> Result<Vec<Cow<'_, Dem>>, GeolithError>
fn patches( &self, bounds: (f64, f64, f64, f64), metres_per_pixel: f64, ) -> Result<Vec<Cow<'_, Dem>>, GeolithError>
Rasters covering bounds, at about metres_per_pixel or finer.
The tiler samples them in order and keeps the first valid value, so overlapping sources resolve the same way on every run.
§Errors
Returns an error when a source raster cannot be read.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".