pub struct TilesConvertReader { /* private fields */ }Expand description
Reader adapter that applies coordinate transforms, bbox filtering, and optional compression changes on-the-fly.
This type implements TileSource, so it can be used anywhere a normal
reader is expected. Use TilesConvertReader::new_from_reader to wrap an
existing reader.
Implementations§
Source§impl TilesConvertReader
impl TilesConvertReader
Sourcepub fn new_from_reader(
reader: Arc<Box<dyn TileSource>>,
cp: TilesConverterParameters,
) -> Result<TilesConvertReader>
pub fn new_from_reader( reader: Arc<Box<dyn TileSource>>, cp: TilesConverterParameters, ) -> Result<TilesConvertReader>
Wraps an existing reader so that reads are transformed according to cp.
Updates the internal TileSourceMetadata and TileJSON to reflect
the chosen bbox, axis transforms, and compression.
§Errors
Propagates errors from querying/deriving parameters or updating metadata.
Trait Implementations§
Source§impl Debug for TilesConvertReader
impl Debug for TilesConvertReader
Source§impl TileSource for TilesConvertReader
impl TileSource for TilesConvertReader
Source§fn source_type(&self) -> Arc<SourceType>
fn source_type(&self) -> Arc<SourceType>
Returns the source type (container format, processor name, or composite). Read more
Source§fn metadata(&self) -> &TileSourceMetadata
fn metadata(&self) -> &TileSourceMetadata
Returns runtime metadata describing the tiles this source will produce. Read more
Source§fn get_tile<'life0, 'life1, 'async_trait>(
&'life0 self,
coord: &'life1 TileCoord,
) -> Pin<Box<dyn Future<Output = Result<Option<Tile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_tile<'life0, 'life1, 'async_trait>(
&'life0 self,
coord: &'life1 TileCoord,
) -> Pin<Box<dyn Future<Output = Result<Option<Tile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches a single tile at the given coordinate. Read more
Source§fn get_tile_stream<'life0, 'async_trait>(
&'life0 self,
bbox: TileBBox,
) -> Pin<Box<dyn Future<Output = Result<TileStream<'_, Tile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_tile_stream<'life0, 'async_trait>(
&'life0 self,
bbox: TileBBox,
) -> Pin<Box<dyn Future<Output = Result<TileStream<'_, Tile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Asynchronously streams all tiles within the given bounding box. Read more
fn stream_individual_tiles<'life0, 'async_trait>(
&'life0 self,
bbox: TileBBox,
) -> Pin<Box<dyn Future<Output = Result<TileStream<'_, Tile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for TilesConvertReader
impl !RefUnwindSafe for TilesConvertReader
impl Send for TilesConvertReader
impl Sync for TilesConvertReader
impl Unpin for TilesConvertReader
impl !UnwindSafe for TilesConvertReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.