mod header;
mod point_z;
mod property_processor;
pub mod reader;
mod shp_reader;
mod shx_reader;
pub use crate::shp::header::ShapeType;
pub use crate::shp::reader::ShpReader;
pub use crate::shp::shp_reader::NO_DATA;
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("I/O error")]
IoError(#[from] std::io::Error),
#[error("The code `{0}` does not correspond to any of the ShapeType code defined by ESRI")]
InvalidFileCode(i32),
#[error("The file code `{0}` is invalid, is this a Shapefile?")]
InvalidShapeType(i32),
#[error("Invalid patch type `{0}`")]
InvalidPatchType(i32),
#[error(
"The requested type: '{requested}' does not correspond to the actual shape type: '{actual}'"
)]
MismatchShapeType {
requested: ShapeType,
actual: ShapeType,
},
#[error("Invalid shape record size")]
InvalidShapeRecordSize,
#[error("Dbase Error")]
DbaseError(#[from] dbase::Error),
#[error("Dbf missing")]
MissingDbf,
#[error("Index file missing")]
MissingIndexFile,
#[error("Geozero error")]
GeozeroError(#[from] crate::error::GeozeroError),
}