Struct kml::ExtraShapes
source · [−]pub struct ExtraShapes {
pub shapes: Vec<ExtraShape>,
}
Expand description
Some dataset imported from KML, CSV, or something else. If the dataset is large, converting to this format and serializing is faster than parsing the original again.
Fields
shapes: Vec<ExtraShape>
Implementations
sourceimpl ExtraShapes
impl ExtraShapes
sourcepub fn load_csv(
path: String,
gps_bounds: &GPSBounds,
timer: &mut Timer<'_>
) -> Result<ExtraShapes>
pub fn load_csv(
path: String,
gps_bounds: &GPSBounds,
timer: &mut Timer<'_>
) -> Result<ExtraShapes>
Parses a .csv file and returns ExtraShapes. Each record must EITHER have a column called ‘Longitude’ and ‘Latitude’, representing a single point, OR a column called ‘geometry’ with a WKT-style linestring. All other columns will just be attributes. Objects that’re partly out-of-bounds will be excluded.
sourceimpl ExtraShapes
impl ExtraShapes
sourcepub fn load_geojson_no_clipping(
path: String,
gps_bounds: &GPSBounds,
require_in_bounds: bool
) -> Result<ExtraShapes>
pub fn load_geojson_no_clipping(
path: String,
gps_bounds: &GPSBounds,
require_in_bounds: bool
) -> Result<ExtraShapes>
Parses a .geojson file and returns ExtraShapes
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ExtraShapes
impl<'de> Deserialize<'de> for ExtraShapes
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for ExtraShapes
impl Serialize for ExtraShapes
Auto Trait Implementations
impl RefUnwindSafe for ExtraShapes
impl Send for ExtraShapes
impl Sync for ExtraShapes
impl Unpin for ExtraShapes
impl UnwindSafe for ExtraShapes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self