Pretty maps in Python
tech.marksblogg.com
tech.marksblogg.com
About once a month, I have to run a script I wrote that generates a list of lat/lon values from company data to generate maps in python. I have to keep a separate machine on an old version of macOS just for this task because python3 broke everything.
ALL of the tutorials online are out of date, broken, or simply don't work. I even contacted the people at Geofabrik and offered to pay them for a solution, but they wouldn't touch the problem with a ten meter cattle prod.
I guess I'll spin up an Ubuntu VM and see if this solution works for me. But the state of mapping is abysmal. Everything is an online service or a GUI. And none of the online services can do batch processing.
I started working with spatial data on the Mac platform before Python 3 had gained much traction, and I can assure you that Python 3 really didn’t break much to speak of. Every major library and tool works as well as ever, and in most cases is vastly improved.
I believe the examples for cartopy mostly work out of the box.
Can't speak for Mac OS but I assume all those are conda-installable there as well.
/home/bill/.pretty/lib/python3.10/site-packages/prettymaps/fetch.py:317: ShapelyDeprecationWarning: __len__ for multi-part geometries is deprecated and will be removed in Shapely 2.0. Check the length of the `geoms` property instead to get the number of parts of a multi-part geometry. list(lines) /home/bill/.pretty/lib/python3.10/site-packages/prettymaps/fetch.py:317: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the `geoms` property to access the constituent parts of a multi-part geometry. list(lines)
* https://github.com/marceloprates/prettymaps/blob/main/etc/NF...
Let me know what it's like running it!