pub struct AreaRules { /* private fields */ }Expand description
Which closed ways are areas rather than closed lines, by their tags: a closed way is an area when one of its tags
says so, and area=yes or area=no overrides every other tag. Only closed ways are tested; an open way is always
a line.
AreaRules::default has a built-in list, started from the CC0 list that osmtogeojson and Overpass turbo use, and
expanded using the OpenStreetMap wiki pages of the tags:
- any value but
noofamenity,area,area:highway,building,building:part,craft,golf,historic,indoor,landcover,landuse,military,office,place,public_transport,ruins,shopandtourism; - any value but
noand a few ofaeroway(notparking_position,runway,taxilane,taxiway),boundary(notadministrative),leisure(notslipway,track),man_made(notbreakwater,cutline,dyke,embankment,groyne,pipeline) andnatural(notarete,cliff,coastline,earth_bank,ridge,tree_row); - only some values of
barrier(city_wall,ditch,hedge,retaining_wall,spikes,wall),highway(elevator,escape,rest_area,services),power(generator,plant,substation,transformer),railway(platform,roundhouse,station,turntable) andwaterway(boatyard,dam,dock,riverbank).
AreaRules::add and AreaRules::remove change the list; AreaRules::none starts from an empty one.
Implementations§
Source§impl AreaRules
impl AreaRules
Sourcepub fn add(&mut self, key: &str, values: &[&str]) -> &mut Self
pub fn add(&mut self, key: &str, values: &[&str]) -> &mut Self
Makes closed ways with key areas: with any value when values is empty, otherwise with these values too.
Trait Implementations§
impl Eq for AreaRules
impl StructuralPartialEq for AreaRules
Auto Trait Implementations§
impl Forget for AreaRules
impl Freeze for AreaRules
impl Move for AreaRules
impl RefUnwindSafe for AreaRules
impl Send for AreaRules
impl Sync for AreaRules
impl Unpin for AreaRules
impl UnsafeUnpin for AreaRules
impl UnwindSafe for AreaRules
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more