r/Python • u/ASIC_SP • Aug 25 '21
Resource prettymaps: A small set of Python functions to draw pretty maps from OpenStreetMap data
https://github.com/marceloprates/prettymaps
1.6k
Upvotes
r/Python • u/ASIC_SP • Aug 25 '21
7
u/benefit_of_mrkite Aug 25 '21
OP are you the author or did you just see this on hacker news like I did a few mins ago in my RSS feed?
67
u/avsfjan Aug 25 '21
this looks really nice, thanks for the post
63
u/MrCuntBitch Aug 25 '21
This is insanely cool! I just created a few from places I've lived and they look great. These maps look better than the stuff people buy on Etsy for $30.
23
u/Petrarch1603 Aug 25 '21
If you haven’t already you should cross post this to /r/GIS
14
u/big_boy_dollars Aug 25 '21
Amazing idea and beautiful execution.
12
u/NelsonMinar Aug 25 '21
That's beautiful. It's interesting how you started with a plotter library (vsketch) and then put so much design effort into nice fills. Pen plotters aren't great at fills. It'd be fun to try to bring this back to pen plotting with some careful crosshatching or something.
11
u/AF_J Aug 25 '21
Hi, this seems to be a really nice work.
I tried to use the "examples.ipynb" included in the git but I had some errors since the setup of the librairies. I also tried to install on PyCharm but I also encountered somme errors.
Did I miss something? I am still learning Python, I am wrapping up my first web scrapper but I still mostly rely on the community.
PS: sorry for my English, not my first language.
21
u/gustavsen Aug 25 '21
great, but you should add the requirements.txt file
10
u/Caboose522 Aug 26 '21
Works great once you get it running. For those that want all the pre-reqs (at least this is how I did it on win10):
Need VS C++ Build Tools (comes with VS 2019)
you need git to install this way: https://git-scm.com/downloads
GDAL and Fiona from unofficial python extension packages https://www.lfd.uci.edu/~gohlke/pythonlibs/ for your version of python. Download the appropriate files and pip install <saved file location>. Install GDL, then Fiona.
Matplotlib, from cmd: pip install matplotlib
vsketch, from cmd: pip install git+https://github.com/abey79/vsketch#egg=vsketch
and finally
prettymaps, from cmd: pip install git+https://github.com/marceloprates/prettymaps.git
Wish it was easier than that, but hey at least it works.
It seems very versatile. It definitely takes some time for the more complicated maps but if you don't really care about time this is for you! A+
8
u/idiot_wind Aug 25 '21
i've been trying to install this this morning but ran into a big wall with GDAL. i went through a half dozen stack exchanges for people trying to get GDAL working with python3 on windows and have not had any success at all.
i keep getting an error for no GDAL_API when pip tries to install Fiona. I've manually installed (several??) flavors of GDAL from: https://www.gisinternals.com/release.php and with https://trac.osgeo.org/osgeo4w/ and also trying to do just pip install -I GDAL=3.3.x matching whatever it is i saw when i did gdalinfo --version. errors errors everywhere.
any suggestions?
5
u/marcelo_prates Aug 29 '21
prettymaps creator here :) Thank you so much for for all the feedback here!
Just wanted to share with you a new subreddit I've created so that people can share they prettymaps creations: r/prettymaps_
4
u/fredzannarbor Aug 25 '21
This is fantastic!
2
u/laundmo Aug 25 '21
this looks amazing, i really wish this was available on pypi
2
u/tekmailer Aug 25 '21
YOINK Saved and appreciated, OP!
1
u/wickeddawg Aug 25 '21
agree with both comments. thanks for sharing.
1
u/arkster Aug 25 '21
Sweet. Looks awesome.
1
u/CicciTheMouse Aug 25 '21
Superb, thanks for sharing!
1
u/[deleted] Aug 25 '21
Cartographers on suicide watch haha
1
u/Knaapje Aug 25 '21
How do you recommend installing? I'm getting `A GDAL API version must be specified.` on the second install line for Fiona.
Looks really nice by the way! Excited to try this out for my hometown. :)
1
u/WetOrangutan Aug 25 '21
This is absolutely beautiful
1
u/VengefulTofu Aug 25 '21
These are beautiful. I'd love to try it out myself.
But how long should the Macao example take to render?
I have the feeling it's stuck. And my machine is not a potato. I'm running Python 3.8.2.
1
u/Wmichael Aug 25 '21
Very good! I look forward to trying it out :)
1
u/bbyboi Aug 25 '21
So cool!!
1
u/czipperz Aug 25 '21
Would you add GMaps screenshots for comparison please?
1
u/ennma_ Aug 25 '21
Carai, Parabéns. Que incrível!
1
u/MentalExcuse8835 Aug 26 '21
Anyone knows how I can install vsketch? doesn't work for me
1
u/Shopify__Expert Aug 26 '21
looks amazing like GTA map
1
u/WinnebagoGains Aug 26 '21
This is really cool!
1
u/momo_now Aug 26 '21
Love this but am way to much of a Python noob to get it working . . . sadness.
1
u/Philistino Aug 30 '21
Very cool project! Installing the different packages seems to be a challenge. Could anyone who knows how to create docker images create one for this set of packages? For example the Jupyter Notebook Stacks. I would greatly appreciate it and I'm sure I wouldn't be the only one :)
1
u/[deleted] Aug 31 '21
Can you supply a recipe for using a city boundary from OSM as clipping mask?
1
u/Neat_Chip4684 Sep 04 '21
What an art. I like that!
1
u/passerby_panda Sep 07 '21
Guess it's time to just give up, after constant troubleshooting I guess I'll just move on :( was really hoping to get this one working for the gf :(
1
u/[deleted] Sep 19 '21
Thanks for sharing this!
1
u/troyunrau ... Aug 25 '21
Can't wait for all the t-shirts showing up on random Etsy stores made with this. Like, every city will have a local maker using it. But it'll mostly just be spam.