Closed krnkktz closed 4 years ago
Hi @krnkktz , Thank you for reporting this, and fixing the bug of the missing "util" variable. Can you please attach your .gh file?
Hi, Thank you!
Here is the .gh file: osmshapes_issue.zip
It turns out that I was looking at an empty location (the bottom one in the .gh file), which is why Reproject()
failed. I am proposing a fix for that in another pull request.
I am still seeing "The component generated invalid shapes data" with the top location, which has some streets, but I guess it is an unrelated problem (should I open an issue?) and, this being my first experience with Gismo/WinMapGIS, I am slightly overwhelmed.
Edit: found the post on the GH forum explaining that the invalid shape data is not Gismo's fault, sorry!
Hi @krnkktz , Thank you for posting the .gh file! Indeed you were right: that location for given radius (OSM Shapes component uses 100meters by default), didn't cover anything in openstreetmaps. Here is a screenshot:
If you increase the radius to 300 for example, you will get the geometry generated from OSM shapes component, as it will cover these roads on the left side of the location.
But you were right, "utils" variable should have been defined.
As for the "The component generated invalid shapes data", delete your "c:\gismo\osm_files" folder, and then use the create_3dbuildings_trees_streets.gh example file by changing to your location. If the error still appears, open a new topic about it on forum.
The OSM Shapes component failing reprojection results in a crash, giving no helpful error message. Defining the variable
util
solves theNameError
, while thereturn
statement allows the error message to be displayed instead of going on assuming a successful reprojection, which eventually crashes becausereprojectedShapefile
isNone
.This only changes the Python file, as I don't know how the .ghuser files are generated for this project, but I'd be happy to do that if given any pointers!
Thanks!