Open bburghaus opened 2 years ago
Same with Milan, Italy
and radius=4000
, but not with radius=3000
.
As a workaround, I modified the code to catch the exception, log and continue, but cannot find the root cause.
This is my change, at line 310 of fetch.py:
I simply moved the list comprehension to a normal for where I can use a try...except and print the error and keep running. In my case it was:
Error No Shapely geometry can be created from null value
Offending object: footway 1
and then the map was generated
I also came to this error.
I tried your solution @jacopofar.
It shows me this:
Error No Shapely geometry can be created from null value
Offending object: footway 1
but then the error came, after that, again.
Any thoughts on that?
My workaround simply skips the geometry causing the issue, the fact you are seeing that message means the exception was handled. Do you mean that after that you still got a stacktrace and the script was terminated? If so it must be a different error, you can paste the output
It's somehow the same Error
It's easier if you paste the error as text rather than a PDF :)
I see the error is in a different piece of code, the one that is dilating the streets. It's a bit hard to fix because with the reduce and list comprehension I cannot tell where exactly the error is coming from. You can try to wrap the whole else
at lines 341-355 in a try..catch
to ignore the offending data and see whether the result looks good
To reproduce:
Barcelona, Spain (square plot with rounded edges)
example(47.606292888654316, -122.33203340169379), radius = 5000