Open ian-r-rose opened 5 years ago
Hey @ian-r-rose, do you think that ibis could eventually replace read_postgis
and to_postgis
methods we have in geopandas? It would be great if we could move the postgis io away from geopandas and use a tiny wrapper instead.
I'm really glad to see the recent work in GeoPandas around performance and scalability (extension arrays, pygeos, dask, etc). I think that will have a huge impact on improving the Python GIS ecosystem. This issue is to flag an alternative approach to scaling GeoPandas, which is to integrate it better with relational geospatial databases like PostGIS.
Over the last few months @xmnlab and I have been putting some cycles towards adding geospatial support to
ibis
, which provides a pandas-like expression system targeting SQL-like backends, including PostgreSQL. When you add geospatial operations to that, the syntax for generating expressions winds up looking a lot like GeoPandas. When the expressions are evaluated, you get back an in-memory GeoDataFrame, which can then be further analyzed in the traditional way.You can see an example of this here, as well as a live binder demo comparing and contrasting some approaches here:
The downside, of course, is that it presumes you already have access to, and data available in, a relational database like PostGIS. But for those cases, I think this provides an attractive ramp to move from big-ish geospatial data to in-memory analysis with GeoPandas.
Anyhow, thought there might be some interest here. This isn't really an issue or bug report, so feel free to close whenever.