OSM file for Elk

I’ve been reading that the Elk plugin for grasshopper uses an OSM file/OSM files to model a site’s topography and/or its buildings and streets.

I was wondering if I need to get this OSM file of wherever we are trying to model/map, or if the plugin has its own way of searching for and retrieving/downloading the OSM file for the desired location, akin to Sketchup’s geo location feature.

Also, any advice and tips on using Elk for creating a site model will be appreciated.


I download the files myself following these instructions : https://wiki.openstreetmap.org/wiki/Downloading_data

If you are comfortable with python then you may find this handy : I used it to add heights in meters to buildings from ism files based on the number of stories GitHub - dancergraham/OSM_building_heights: Convert building heights in stories to heights in metres


Hi @clonosis ,
In addition to @Dancergraham reply:
Gismo has the same feature as the Sketchup one described: get the buildings, streets, terrain for a defined location and radius. No manual downloading of openstreetmap is required.
Installation steps are here.


Oh cool. Gismo seems to be somewhat similar to Elk.

Do you think its possible to make a site model with topography+buildings with Gizmo? or should I stick to Elk? I’d appreciate any advice.


If I wanted an OSM data of a city (more like a district in the city), I would be using an extraction service like BBBike.org right? Please add any comments or correct me if I’m wrong.

Also, what are all these different OSM file formats? Which one should I be using for the Elk grasshopper plugin with Rhino?

@clonosis ,
Yes, you can automatically generate the 3D buildings, streets, trees and terrain by defining a location and a radius. Here is an example:

1 Like

Hi -
As for this one…

Elk reads the *.osm format, so you’ll need “OSM XML gzip’d” or “OSM XML 7z (xz)” and then unzip.

For large and frequent downloads, yes, use an extraction service. For a small one-off download, you could just download from Openstreetmap:



Awesome! Do you have any tutorials for the plugin?

Also, are the terrain, buildings, and streets (and trees) that are generated from gizmo solids/breps or meshes? Can I control the output?

Thanks! Do you have any advice on making a site model with streets, buildings, and topographic data with the Elk plugin? Would appreciate tutorials, tips, etc.!

@clonosis ,
Everything are polysurfaces, which you can then convert to meshes if you need them (with Rhino’s Mesh command).
Follow the installation steps first.
Then use this example file (just change your location and radius, and turn on all the Grasshopper boolean toggles to ‘True’ in order to generate the 3D geometry).
If you already have a terrain, input it to the ‘groundTerrain_’ of the ‘OSM 3D’ component.

If you don’t have a terrain, and would like to generate one, use the ‘Terrain Generator’ component:


Nice! I would prefer everything to be polysurfaces. (unless the model gets too laggy, etc.)

Am I understanding this correctly that while Elk requires an external download of an OSM file of the site, the Gismo plugin searches and acquires the necessary location data on its own? Gismo still uses an OSM file/OSM data right?

Are the buildings correct in scale and height? Or are all the buildings generated in the same height?

I will try to follow installation steps and the example file and see how it goes. Would you be available for troubleshooting if necessary? What would be the best way to reach you?

Hi -

Gismo uses OSM data, yes, but downloads that on the fly based on the location and the radius that you set.

Have you installed the plug-in? There are tooltips that explain what will happen. In many (I’d say, most) cases, there isn’t any height information available in the OSM data.

I assume that your questions might be helpful for more users. There is a Gismo section on this forum and there is one on the old Grasshopper site.


I am trying to install Gismo atm. Since I am on Rhino 7, do I not require GhPython?

That is my understanding, yes.


Thank you @wim for the help with replies.
Yes, you don’t need to install Ghpython, as it is already shipped with Grasshopper.

Yes, that is correct.

If osm contains height of the building, it will be extruded by that specific height. If not, a number of stories information is searched, and the the height will correspond to the number of stories times the ‘heightPerLevel_’ input. If none of these two information exists, a random height will be generated based on the ‘randomHeightRange_’ input.

You can open a new topic on this forum, in case you have issues.


Oh… interesting…? I thought OSM data was supposed to have height information. In either Gismo or Elk (currently trying Gismo but getting errors), how would I get a 3d model/extrusion of a building then?

Hi -

Djordje answer that question for Gismo. If the height is provided, it is used. If that is not available, but the number of floors is available, the component will multiply that with a value that you can specify. If neither is available, the component looks at the range that you provide.

Elk doesn’t have a component that does all that for you but you can check which information is available in the osm file for each building and then apply the logic yourself. Tim Stark has provided a graph that does all that:


1 Like

Okay that makes sense.

I’m trying to use Gismo but I’m getting a runtime error… Would you know how to troubleshoot?

Maybe I’ll use Elk instead since there seems to be more tutorials/references online for Elk.

Hi @clonosis
The coordinates you entered are for the Takla Makan desert in China. There are no settlements there, so you get an empty OSM file, thus the error.

1 Like