-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling cases where feature may not have any geometry at all #349
Conversation
It looks like GDAL returns |
@lnicola , I was wondering about returning an I'd be happy to rework this into returning an |
Agreed, but in more than 99.9% of cases, writing to a file will succeed, yet Rust still makes us check for the outcome. It's just more idiomatic this way. (and you don't strictly need to |
@metasim, @jdroenner , @ChristianBeilschmidt - do any of you have an opinion on panic vs If there's consensus, I'll rework this to return an |
@phayes 1000% |
… when the feature does not have geometry
bors r=lnicola |
Build succeeded: |
CHANGES.md
if knowledge of this change could be valuable to users.I've run into a few instances where I'm loading data uploaded from users (for example CSV files) where GDAL isn't able to find any geometry. In instances where you might be working with user-provided data with no geometry, calls to
Feature::geometry()
simply panic.This PR documents renders
Feature::geometry
non-panicking by returning anOption<&Geometry>