marceloprates / prettymaps

A small set of Python functions to draw pretty maps from OpenStreetMap data. Based on osmnx, matplotlib and shapely libraries.
GNU Affero General Public License v3.0
11.02k stars 516 forks source link

Portrait orientation of Barcelona example #81

Open generativearts opened 2 years ago

generativearts commented 2 years ago

Hello! Is it possible to make Barcelona example in portrait orientation? Draw map 2/3 proportion rectangle not square.

marceloprates commented 2 years ago

Currently you can do that by updating the perimeter's shape in the "postprocessing" function, but I'm planning to add aspect ratio as a parameter for the prettymaps.plot function

generativearts commented 2 years ago

Thank you

danielwiegand commented 1 year ago

Could you maybe provide a short example how to do this with postprocessing? I tried modifying layers["perimeter"].bounds, but I guess it might be a problem that shapely geometry objects have become immutable as of v2.0: https://shapely.readthedocs.io/en/stable/migration.html#geometry-objects-will-become-immutable

till-m commented 1 year ago

Hey @generativearts & @danielwiegand did you ever figure out how to do this?

danielwiegand commented 1 year ago

@till-m No. I ended up generating a quadratic image and changing the aspect ratio by means of Gimp.

ga58xes commented 1 year ago

any updates on this?