-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add total_bounds of layer to read_info
#281
Add total_bounds of layer to read_info
#281
Conversation
read_info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @theroggy !
What do you think about exposing a couple items to the capabilities list as well as suggested in 274:
fast_total_bounds
:OGR_L_TestCapability(ogr_layer, OLCFastGetExtent)
fast_feature_count
:OGR_L_TestCapability(ogr_layer, OLCFastFeatureCount)
I'm OK with adding a breaking change for counts for GeoJSON data sources for read_info
; this keeps us closer in parity to the underlying driver's capabilities.
Oops, forgot that one... Added them. Apparently the existing capabilities there had value 0 or 1, which isn't ideal I think? So I changed them to boolean.
Done. The capabilities weren't documented anywhere yet (now i mention them in the read_info doc), but to be clear I also added a breaking change to clarify that they are now booleans. |
checking a struct for NULL is not possible as it isn't a pointer
…a-pyogrio.read_info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
I made
force_feature_count
default toFalse
, which is a breaking change for eg. geojson: will return -1 forread_info()["features"]
now by default because determining number features is not fast for this file type.Not sure if this is OK? If OK, I'll add it as a breaking change in the changelog.
closes #274