pub struct ShapefileReader { /* private fields */ }Expand description
Shapefile reader that coordinates .shp, .dbf, and optionally .shx files
Implementations§
Source§impl ShapefileReader
impl ShapefileReader
Sourcepub fn open<P: AsRef<Path>>(base_path: P) -> Result<Self>
pub fn open<P: AsRef<Path>>(base_path: P) -> Result<Self>
Opens a Shapefile from a base path (without extension)
Reads the .shp, .dbf, and optionally .shx files.
Sourcepub fn header(&self) -> &ShapefileHeader
pub fn header(&self) -> &ShapefileHeader
Returns the Shapefile header
Sourcepub fn field_descriptors(&self) -> &[FieldDescriptor]
pub fn field_descriptors(&self) -> &[FieldDescriptor]
Returns the field descriptors
Sourcepub fn index_entries(&self) -> Option<&[IndexEntry]>
pub fn index_entries(&self) -> Option<&[IndexEntry]>
Returns the index entries (if .shx was loaded)
Sourcepub fn read_features(&self) -> Result<Vec<ShapefileFeature>>
pub fn read_features(&self) -> Result<Vec<ShapefileFeature>>
Reads all features from the Shapefile
Auto Trait Implementations§
impl Freeze for ShapefileReader
impl RefUnwindSafe for ShapefileReader
impl Send for ShapefileReader
impl Sync for ShapefileReader
impl Unpin for ShapefileReader
impl UnsafeUnpin for ShapefileReader
impl UnwindSafe for ShapefileReader
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