Skip to content

Commit

Permalink
Improved flatgeobuf error (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron authored Nov 1, 2023
1 parent d677bec commit 29930b0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/io/flatgeobuf/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use crate::array::MutablePointArray;
use crate::array::*;
use crate::error::Result;
use crate::error::{GeoArrowError, Result};
use crate::io::flatgeobuf::anyvalue::AnyMutableArray;
use crate::table::GeoTable;
use crate::trait_::MutableGeometryArray;
Expand Down Expand Up @@ -446,8 +446,13 @@ pub fn read_flatgeobuf<R: Read + Seek>(file: &mut R) -> Result<GeoTable> {
builder.finish()
}
// TODO: Parse into a GeometryCollection array and then downcast to a single-typed array if possible.
GeometryType::Unknown => todo!(),
_ => todo!(),
GeometryType::Unknown => Err(GeoArrowError::NotYetImplemented(
"Parsing FlatGeobuf from unknown geometry type not yet supported.".to_string(),
)),
geom_type => Err(GeoArrowError::NotYetImplemented(format!(
"Parsing FlatGeobuf from {:?} geometry type not yet supported",
geom_type
))),
}
}

Expand Down

0 comments on commit 29930b0

Please sign in to comment.