1#![deprecated(
2 note = "The geozero_shp crate has been deprecated. Instead, use geozero's built-in shapefile feature"
3)]
4
5mod header;
6mod point_z;
7mod property_processor;
8pub mod reader;
9mod shp_reader;
10mod shx_reader;
11
12pub use crate::header::ShapeType;
13pub use crate::reader::Reader;
14pub use crate::shp_reader::NO_DATA;
15
16pub use geozero;
18
19#[derive(thiserror::Error, Debug)]
21pub enum Error {
22 #[error("I/O error")]
24 IoError(#[from] std::io::Error),
25 #[error("The code `{0}` does not correspond to any of the ShapeType code defined by ESRI")]
27 InvalidFileCode(i32),
28 #[error("The file code `{0}` is invalid, is this a Shapefile?")]
31 InvalidShapeType(i32),
32 #[error("Invalid patch type `{0}`")]
34 InvalidPatchType(i32),
35 #[error("The requested type: '{requested}' does not correspond to the actual shape type: '{actual}'")]
38 MismatchShapeType {
39 requested: ShapeType,
41 actual: ShapeType,
43 },
44 #[error("Invalid shape record size")]
45 InvalidShapeRecordSize,
46 #[error("Dbase Error")]
47 DbaseError(#[from] dbase::Error),
48 #[error("Dbf missing")]
49 MissingDbf,
50 #[error("Index file missing")]
51 MissingIndexFile,
52 #[error("Geozero error")]
53 GeozeroError(#[from] geozero::error::GeozeroError),
54}