geopandas / pyogrio

Vectorized vector I/O using OGR
https://pyogrio.readthedocs.io
MIT License
257 stars 21 forks source link

PERF: optimize geometry type checking in write_dataframe #393

Closed jorisvandenbossche closed 2 months ago

jorisvandenbossche commented 2 months ago

I was checking the performance of write_dataframe and noticed there was a significant part spent in __ne__ of the geometry array, which can be optimized by using a built-in method for checking missing values instead of using != None (for a larger dataset this can take more than a second, while the notna() call is in the milliseconds)