[go: up one dir, main page]

shapefile 0.1.0

Read & Write shapefiles in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate shapefile;

mod testfiles;

#[test]
fn test_line() {
    let mut reader = shapefile::Reader::from_path(testfiles::LINE_PATH).unwrap();

    if let Some(shape) = reader.read_nth_shape(0) {
        let shp = shape.unwrap();
        testfiles::check_line_first_shape(&shp);
    } else {
        assert!(false, "Should be Some(shape)")
    }

    assert_eq!(reader.read_nth_shape(1).is_none(), true);
}