-
Notifications
You must be signed in to change notification settings - Fork 203
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
[WIP] Initial commit of bulk reading into numpy arrays #540
Conversation
@snorfalorpagus Thanks a lot for exploring this! With regard to the TODO "best way to return geometries for shapely?", I would say either WKB or WKT, depending on which is the fastest/cheapest to create and convert afterwards (which I assume will be WKB?) |
|
c1894e4
to
6784292
Compare
It looks like GDAL 1.x is having problem with the datetime field? It looks like we don't actually test this in the regular reader/writer. |
length = OGR_L_GetFeatureCount(session.cogr_layer, 0) | ||
|
||
data_fids = np.empty([length], dtype=object) | ||
data_properties = {} |
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.
Thoughts on using a structured array for data_properties
?
For those finding this issue later and wanting to know how support for vectorized reading from OGR/GDAL evolved, see pyogrio. Thanks again @snorfalorpagus for the initial work on this! |
This is a first attempt at providing a bulk load of data into NumPy arrays, as suggested in #469.
It's a work in progress. I'm sure it's not perfectly optimized and there are some edge cases that aren't handle yet (e.g. NULL values in
int
columns), date fields.Does this provide the right kind of interface for geopandas @jorisvandenbossche? Do you have any opinions @sgillies?