algorithmic modeling for Rhino
The problem is the OSM file you're providing is missing some information that Elk is expecting, particularly the <bounds></bounds> tag that's typically found near the beginning of the file. In a typical OSM file downloaded directly from OpenStreetMap or from something like Overpass API, the bounds is usually found near the very top just inside of the OSM tag.
This tells it the extent of the data so it can transform the data properly. With this tag missing, it just throws an error you see. You have two options to deal with this. Option 1, if you know what the bounds are from the application you exported from you can just create the bounds tag with that information, following the same format as the image above. Option 2, you can parse through the XML file and figure out the extents of the data and create the bounds tag that way.
I'm not familiar with QGIS so I've attached is a GH file that just has a C# node that you can provide an OSM file and it will tell you the bounds based on option 2.
Just copy this line and place it just inside the OSM tag in your file.
Save the file, and when you then try to use it to pull data via Elk, it should work.
One thing to note about Option 2 is that there's a good chance the relevant data will be pushed up and to the right from the world origin rather than the way Elk typically places the information at or near 0,0. This is just because some of the data that passes through the desired bounds extends well outside of it and is included in the OSM file rather than trying to truncate it.
Thanks Tim for the detailed answer! It worked.
Sorry, but I have another little question for you. I used QGIS to set the scale of terrain, but elk does not change the scale. I understand that you need to change scale in the GH. What is the default scale in .osm?
There's no units or scale to the OSM data. Everything in the file is just latitude and longitude coordinates, so when you import it with Elk it converts the latitude and longitude to whatever units your project contain at a 1 to 1 scale.
There is some distortion to Elk that is described a bit if you feel like slogging through some of of the other posts in this group. Some that come to mind are:
http://www.grasshopper3d.com/group/elk/forum/topics/convert-lat-lon...
http://www.grasshopper3d.com/group/elk/forum/topics/converting-lati...
http://www.grasshopper3d.com/group/elk/forum/topics/combining-csv-a...
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by