Elk

Elk is a set of tools to generate map and topographical surfaces using open source data from OpenStreetMap.org and Shuttle Radar Topography Mission (SRTM) data from NASA/Jet Propulsion Labs.

 

OSMData Component

This component should be used first.  This is the component that converts the latitude and longitude locations to Grasshopper points.  It exports the list of points and the point IDs.  An optional scale can be used to scale it up or down from full scale.  The number input into the scale will determine the length of the shortest overall side of the exported map.

Road/Rail/Water Components

The other OSM components divide the data from the OSM file into different way types.  For example the Highway divides it into Motorways, Motorway Links, Trunks and Trunk Links.  More information on the types of ways that can be found in the OSM file is in the Documentation section of the OpenStreetMap website.  These components only take advantage of a small set of the total possible map features specified, mostly because a complete set of map features would require a large number of outputs.  I just chose the ones that seemed appropriate.

Generic OSM Component

The GenericOSM component allows you to select specific information from the OSM file that the other components do not support.  For instance all buildings, or a specific building type can be output.  This component has two new inputs: Key (e.g. "building", "natural", etc.) and Value (e.g. "house", "tree", etc.).  A Key is necessary, but the Value input defaults to "*" for processing all data for that Key, otherwise specific Values can be input to only get those.  For example you can access all buildings by just assinging "building" to the Key and leaving Value with the default "*", or you can access all hotel buildings by assigning a Key of "building" and a Value of "hotel".

SRTM Topo Component

The SRTM Topo component generates topo's using either SRTM1 or SRTM3 data.  SRTM1 data is sampled at one arcsecond (about 30 meters) and SRTM3 data is sampled at three arcseconds (about 90 meters).  The higher resolution SRTM1 data is available for most of the US and the lower res SRTM3 data is available for most of the world.  The data can contain voids which place points at -32768 meters.  The component has inputs for the HGT file path, latitude domain, longitude domain, and a format boolean (true for SRTM1, false for SRTM3).  It outputs points as a datatree organized in latitudinal rows and curves as a list of latitudinal curves based on those points.  You can find the data here.

To install:

  • In Grasshopper, choose File > Special Folders > Components folder. Save the gha file there.
  • Right-click the file > Properties > make sure there is no "blocked" text
  • Restart Rhino and Grasshopper

- TL

Plug-in rating:
4.75
Average: 4.8 (4 votes)
Downloads:
Title Release Notes
Elk 0.2
2012-Feb-05
This release adds a Generic OSM component. This allows you to select any data from the OSM file to generate points.  
919 downloads
Version: 0.2.0.0
Elk 0.1
2012-Jan-15
This release finally contains the SRTM Topo component. The OSM components are unchanged from the previous release.  
250 downloads
Version: 0.1.0.0
Elk Initial Release
2011-Nov-16
This first release includes components for working with OpenStreetMap.org data within Grasshopper.  
510 downloads
Version: 0.0.1.0
Plug-In videos:

    
     
    
       

Comments

timcastelijn's picture

hi,

great plugin, thanks you. Does elk use mercator translations to convert WGS coordinates to points? I want to use this conversion to add a static reference point for an area model based on variable OSM-data.

cheers,
tim castelijn

designinvienna's picture

So far, I love this nifty little plugin! Well done, Tim!
I've run into a little problem though; perhaps you can help me. When feeding in some .osm files into the OSMData, I get an error saying: "Object reference not set to an instance of an object".
I've cut an .osm of an entire country into a specific city as the zoom level I want does not permit me to export it directly from openstreetmaps.org. Could it be, that the city.osm file is too big? (It's around 100mb)
Edit:
So I realized that actually the bounding box was missing in the xml code for the generated city.osm. After adding it, the dots show up in grasshopper, but roads, streets and waterways don't link up. Any ideas?

tlogan's picture

It may depend on where you're getting your information. When I originally created it, I did so to pull in basically a neighborhood. Getting the OSM file by exporting from openstreetmaps.org will do this for you, but it's limited to how many nodes it can pull (50,000) into the export. There are other solutions where entire cities have been assembled, but their format isn't always the same as the typical OSM export and therefore can't be ready. I'm currently working on a new version that integrates the ability to pull information from the Overpass API that lets you specify the lat/lon domains and get as much data as you want. This can potentially pull millions of points so it has a tendency to take longer to process. There are other sources of the data that I've seen, including ones where an entire city is available as a single file, but I'm not sure how much I'll go into supporting different formats. If there's one that's popular I may work on support, otherwise I think the Overpass and typical openstreetmaps.org export should be adequate.

-Tim

RosauraVelazco's picture

Hello everybody. I dowloaded the plug-in and the video tutorial, downloaded the same files in the web sites indicated, put the domains in exact way as the tutorial but I cannot get the points or the curves deployed. I'm using Rhino 4 SR9 and GH 0066. Something missing? Thanks.

RosauraVelazco's picture

hello. I tried again, bake the results as points and breps and I've got results. I also changed my units to Kilometers. Anyway, I'm missing the Scale part of the SRTMTopo Component. Maybe the video tutorial refers to other version of ELK.
Great plug in. Thanks.

tlogan's picture

The scale was in the initial version I made and never released. It never worked properly so I pulled it out before I released it. I figured it would be just as easy for now for people to scale the output using the typical scale component using the origin as the point. I may take a look at this again and see about implementing it with the next release.

pspcpog's picture

Great tool. Highly appreciated!

jx1587's picture

Guys, i'm new and i really did not get the grasshopper definition? Should we build it on our own? I mean that takes a hell lot of time for me? Plus to that maybe i can't even make that definition correct. Why did not you just put the definition for people to download? I can't do anything without that definition.

michaeldrobnik's picture

Amazing Tool. Is there a possibilty to access additional attributes like building height?
Great work!

em's picture

Tim,
great work.
Could you give some additional knowledge on how to align both the extents of the topography with the map vector information?
I have achieved both the input of .osm and hgt. info, now I would like them to both align. It seems there is no boundary/crop region to the .osm data making this difficult.

thanks
erik

tlogan's picture

There's a bounds tag in the OSM file that tells you what the min/max longitude and latitude is. It's a little hard to see if you open the OSM file in notepad, but it's near the top of the file. Just search for the word bounds and you should find it pretty easily.

In a future update I may have the OSM Data component output the lat/lon domains so you can input them directly in the SRTM component.

-Tim

iker.mugarra.flores@hotmail.co.uk's picture

Hi guys!,

I'm trying to use the [SRTMTOP] and all works fine, i also got the points and curves; but I'm not to sure about how the domains input works or what is the consequences of feeding the wrong data,could some one explain me a little bit more how to input the wright number for the domains of the longitude and latitude and how do they work and operate in more detail?....

Thanks

Iker

tlogan's picture

The latitude and longitude domains indicate the maximum extents of the topo. The SRTM files are in 1°x1° squares, which can contain up to 12,967,201 points. So the domains help limit how much of that information is processed to generate a topo.

So say you had a SRTM file for N35W114 (lower left corner), but the site you wanted was actually from N35.162 to N35.168 and W113.726 to W113.721 you would set the domain accordingly. So the Latitude domain would be 35.162 To 35.168 (northern hemisphere is positive, southern is negative) and the Longitude domain would be -113.726 To -113.721 (western hemisphere is negative, eastern is positive).

If I remember correctly the number to the left of the decmial gets stripped off because the files are in 1° increments, so you really only need the decimal number since it only needs to know the values from 0 to 1. I don't believe there's any information in the HGT file itself to check the domain against though I could check against the file name, but that's not really any more fool proof. I generally keep the full latitude and longitude numbers just because it's easier to understand.

As far as feeding it the wrong data, it basically just means that you're going to get a random bit of topo and not what you want.

iker.mugarra.flores@hotmail.co.uk's picture

Thank you very much for extremely fast answer!!!!
ones again thank, now all makes sense...

ps: great plugin ...

JCM's picture

This is plugin shows great potential! I have already used for a few of my classes for connectivity analysis via spiderweb. It would be great if more of the data within the .osm files were accessible. The SRTM support is a great feature.

tlogan's picture

I have plans to add a generic OSM component where you just feed it the type of data you want from the OSM features and it will output that single type of data. For instance if you wanted to show university buildings, then you would feed it the primary key "building" and then the secondary key "university" and it would show any building footprints that match. I should have time to get it built and tested soon.

don_s's picture

Amazing work! I just started using your plugin yesterday and am amazed at its potential. I would also like to be able to query the additional OSM data sourced from the open street map xml file. Buildings, paths, etc...

claudioarchi's picture

Thank you very much for this super tool

Fuintur's picture

When installed, I can only see six components out of seven you show in the video. The one I can't see is the one that gets the contour lines. Is there any reason for such a strange behavior? Thanks.

--------------

I read twice, it clearly states: "This initial release only contains the OpenStreetMap.org tools."

Topography belongs to "Shuttle Radar Topography Mission (SRTM) data from NASA/Jet Propulsion Labs", which is yet not included.

I'm in Europe, though, and my field is architecture, so accuracy may not be high enough for my purpouses. Interesting anyhow.

Erick Katzenstein's picture

Tim, you're a beast.

cbarlieb's picture

wonderful !!

sannevanderburgh's picture

Looks promising. Can't wait for the SRTM support!