You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interest in I/O methods interfacing geopandas objects? #270
a while ago, when we considered providing pure Python I/O in GeoPandas, I have drafted read and write functions to and from GeoDataFrames to shapefile using pyshp. We decided not to go that way in the end but I was wondering if you might be interested in including it here before I'll simply dump it to a Gist and forget about it.
You can check the implementation here geopandas/geopandas#1580 . It may be a little dated but should likely work. I am happy to turn it into a PR if you consider it worthwhile, but I am also happy to let it go.
Is the essence of it the two read and write functions in the attached file?
It pulls in pyproj and chardet, but the encoding fallback and cpg support would be useful - (issue #247 requested support for cpg files).
PyShp shouldn't pull in geopandas by default, so It'd need an optional extra install on PyPi. PyShp's setup.py is a nice simple two liner at the moment.
The functions are well worth putting on a branch though, as people can install that straight from github with pip now.
Activity
JamesParrott commentedon May 2, 2024
Thanks for this Martin.
Is the essence of it the two read and write functions in the attached file?
It pulls in pyproj and chardet, but the encoding fallback and cpg support would be useful - (issue #247 requested support for cpg files).
PyShp shouldn't pull in geopandas by default, so It'd need an optional extra install on PyPi. PyShp's setup.py is a nice simple two liner at the moment.
The functions are well worth putting on a branch though, as people can install that straight from github with pip now.
PyShp_read_write_Geodataframe.zip
JamesParrott commentedon May 2, 2024
I've thrown this together (and have not tested it):
https://github.com/JamesParrott/IronPyShp/tree/PyShp-read-write-Geopandas-DFs
martinfleis commentedon May 6, 2024
Yes, it should work in the same way you included it in https://github.com/JamesParrott/IronPyShp/tree/PyShp-read-write-Geopandas-DFs. Might need minor touches to accommodate for the latest API changes here and there but I don't expect much.
Agree, all those shall be soft-dependencies here.