[−][src]Function shapefile::reader::read
pub fn read<T: AsRef<Path>>(path: T) -> Result<Vec<Shape>, Error>
Function to read all the Shapes in a file.
Returns a Vec<Shape>
which means that you will have to match
the individual Shape contained inside the Vec
to get the actual struct
Useful if you don't know in advance (at compile time) which kind of shape the file contains
Examples
let shapes = shapefile::read("tests/data/multipatch.shp").unwrap(); assert_eq!(shapes.len(), 1);