Skip to main content

ElevationSource

Trait ElevationSource 

Source
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§

Source

fn wgs84_bounds(&self) -> (f64, f64, f64, f64)

Geographic footprint of the data.

Source

fn elevation_range(&self) -> Option<(f32, f32)>

Minimum and maximum valid elevation, or None when fully nodata.

Source

fn source_epsg(&self) -> u32

EPSG code recorded in the archive metadata.

Source

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".

Implementors§