pub struct WKTGeometryReader {
pub features: Vec<VectorFeature>,
}Expand description
§WKT Geometry Reader
§Description
Parse a collection of WKT geometries from a string
Implements the FeatureReader trait
§Usage
The methods you have access to:
WKTGeometryReader::new: Create a new WKTGeometryReader
use gistools::{parsers::FeatureReader, readers::WKTGeometryReader};
let collection_wkt = r#"POINT(4 6)
GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(3 4,5 6))
MULTIPOLYGON EMPTY
TRIANGLE((0 0 0,0 1 0,1 1 0,0 0 0))"#;
let reader = WKTGeometryReader::new(collection_wkt.into());
let features: Vec<_> = reader.iter().collect();
assert_eq!(features.len(), 3);§Links
Fields§
§features: Vec<VectorFeature>The parsed WKT geometries
Implementations§
Trait Implementations§
Source§impl Clone for WKTGeometryReader
impl Clone for WKTGeometryReader
Source§fn clone(&self) -> WKTGeometryReader
fn clone(&self) -> WKTGeometryReader
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WKTGeometryReader
impl Debug for WKTGeometryReader
Source§impl FeatureReader<(), Map<String, ValueType>, Map<String, ValueType>> for WKTGeometryReader
A feature reader trait with a callback-based approach
impl FeatureReader<(), Map<String, ValueType>, Map<String, ValueType>> for WKTGeometryReader
A feature reader trait with a callback-based approach
Source§type FeatureIterator<'a> = WKTIterator<'a>
type FeatureIterator<'a> = WKTIterator<'a>
The Feature Reader should implement an iterator of some kind
Source§fn iter(&self) -> Self::FeatureIterator<'_>
fn iter(&self) -> Self::FeatureIterator<'_>
All readers have an iter function that returns a Iterator struct
Auto Trait Implementations§
impl Freeze for WKTGeometryReader
impl RefUnwindSafe for WKTGeometryReader
impl Send for WKTGeometryReader
impl Sync for WKTGeometryReader
impl Unpin for WKTGeometryReader
impl UnwindSafe for WKTGeometryReader
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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