Open mikedewar opened 2 years ago
took about 30 more seconds of mucking around to realise that the answer is
from shapely.geometry.polygon import Polygon
so many polygons!
Will leave this here just in case others are having similar issues to me. I don't know if I did something wrong on the install, but it might be that the Polygon
you're expecting to be in everyone's namespace isn't actually there!
Hi,
First of all - thanks so much for this library. It's gorgeous.
I'm trying to follow along with the "Palmanova, Italy" example, which is bounded by the city's walls
https://nbviewer.jupyter.org/github/marceloprates/prettymaps/blob/main/notebooks/examples.ipynb#Palmanova,-Italy-(circle-plot-with-postprocessing-step)
I'm getting stuck with the preprocessing function, as to start with my notebook doesn't know what the
Polygon
function is. After digging into the source a bit it turns out you're usingshapely.geometry.Polygon
and so I hoped that if I import that directly then it would be OK. So I addIf I do this, I now have a Polygon function but I don't think I've gotten it right, because I instead receive when I execute
boundary = Polygon(layers['green'].buffer(5)[0].exterior).buffer(0)
I receiveat which point I gave up.
Any clues you could provide would be most appreciated!