pub struct MetadataBuilder { /* private fields */ }Expand description
§Metadata Builder
§Description
Build a Metadata from scratch. Helper tool when constructing a set of tiles
§Usage
MetadataBuilder::commit: Commit the metadata and take ownership of aMetadataMetadataBuilder::set_name: Set the description of the dataMetadataBuilder::set_scheme: Set the scheme of the data. [default=fzxy]MetadataBuilder::set_extension: Set the extension of the data. [default=pbf]MetadataBuilder::set_type: Set the type of the data. [default=vector]MetadataBuilder::set_version: Set the version of the dataMetadataBuilder::set_description: Set the description of the dataMetadataBuilder::set_encoding: Set the encoding of the data. [default=none]MetadataBuilder::add_attribution: Add an attribution to the dataMetadataBuilder::add_layer: Add a layer to the dataMetadataBuilder::add_tile_wm: Add the WM tile metadataMetadataBuilder::add_tile_s2: Add the S2 tile metadataMetadataBuilder::update_center: Update the center now that all tiles have been addedMetadataBuilder::add_bounds_wm: Add the bounds of the tile for WM dataMetadataBuilder::add_bounds_s2: Add the bounds of the tile for S2 dataMetadataBuilder::update_lon_lat_bounds: Update the lon-lat bounds so eventually we can find the center point of the data
Implementations§
Source§impl MetadataBuilder
impl MetadataBuilder
Sourcepub fn set_scheme(&mut self, scheme: Scheme)
pub fn set_scheme(&mut self, scheme: Scheme)
Set the scheme of the data. [default=fzxy]
Sourcepub fn set_extension(&mut self, extension: String)
pub fn set_extension(&mut self, extension: String)
Set the extension of the data. [default=pbf]
Sourcepub fn set_type(&mut self, type: SourceType)
pub fn set_type(&mut self, type: SourceType)
Set the type of the data. [default=vector]
Sourcepub fn set_version(&mut self, version: String)
pub fn set_version(&mut self, version: String)
Set the version of the data
Sourcepub fn set_description(&mut self, description: String)
pub fn set_description(&mut self, description: String)
Set the description of the data
Sourcepub fn set_encoding(&mut self, encoding: Encoding)
pub fn set_encoding(&mut self, encoding: Encoding)
Set the encoding of the data. [default=none]
Sourcepub fn add_attribution(&mut self, display_name: &str, href: &str)
pub fn add_attribution(&mut self, display_name: &str, href: &str)
add an attribution
Sourcepub fn add_layer(&mut self, name: &str, layer: &LayerMetaData)
pub fn add_layer(&mut self, name: &str, layer: &LayerMetaData)
Add the layer metadata
Sourcepub fn add_tile_wm(
&mut self,
zoom: u8,
x: u32,
y: u32,
ll_bounds: &LonLatBounds,
)
pub fn add_tile_wm( &mut self, zoom: u8, x: u32, y: u32, ll_bounds: &LonLatBounds, )
Add the WM tile metadata
Sourcepub fn add_tile_s2(
&mut self,
face: Face,
zoom: u8,
x: u32,
y: u32,
ll_bounds: &LonLatBounds,
)
pub fn add_tile_s2( &mut self, face: Face, zoom: u8, x: u32, y: u32, ll_bounds: &LonLatBounds, )
Add the S2 tile metadata
Trait Implementations§
Source§impl Clone for MetadataBuilder
impl Clone for MetadataBuilder
Source§fn clone(&self) -> MetadataBuilder
fn clone(&self) -> MetadataBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetadataBuilder
impl Debug for MetadataBuilder
Auto Trait Implementations§
impl Freeze for MetadataBuilder
impl RefUnwindSafe for MetadataBuilder
impl Send for MetadataBuilder
impl Sync for MetadataBuilder
impl Unpin for MetadataBuilder
impl UnwindSafe for MetadataBuilder
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