Repository navigation
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.mdif 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::geometrynon-panicking by returning anOption<&Geometry>