How to generate Urban Context automatically in ArchiCAD?
Open Street Maps (OSM) to Rhino/GH to ArchiCAD Workflow
I’m Vignesh Kaushik. I curate and write articles on Thank God It’s Computational to help architects, designers, and urban planners leverage cutting-edge technologies on AEC projects.
TGIC is a community-driven platform providing concise technology education to students and professionals in the AEC industry to learn at their own pace. If you’re not a member, consider joining the community and supporting our work.
In this Computational BIM workflow, let’s take a look at how could we leverage the urban data in Open Street Maps (OSM) database to generate building contexts automatically in ArchiCAD. This is super useful for Architects/Designers to position their project site and have the surrounding buildings generated for them without having to trace and draw them one by one manually. It can save many hours of boring, mundane work.
Below is a simple 4-step process:
Step 01: Download .OSM file
OpenStreetMap is built by a community of mappers that contribute and maintain data about roads, trails, cafés, railway stations, and much more, all over the world. OpenStreetMap emphasizes local knowledge. Contributors use aerial imagery, GPS devices, and low-tech field maps to verify that OSM is accurate and up to date - but there could be chances of slight errors - so use the below workflow with that caveat in mind.
Go to www.openstreetmap.org and search & select the extent of the map that you’d like and hit the export button. This would download an .OSM file to your selected folder.
An OSM file contains street map information in the OpenStreetMap (OSM) format. It saves XML-formatted data in the form of "nodes" (points), "ways" (connections), and "relations" (street and object properties, such as tags).
One can also cross-refer the selected context on the OSM Buildings website to view the buildings in 3D if the data is available. OSM Buildings is a free and open-source web viewer for 3D buildings. The data is based on XYZ tiles and the data format is GeoJSON with geometry projection EPSG:4326 (WGS84). For business users who’d like more premium data, head over to 3dbuildings.com.
Step 02: Install Elk grasshopper plugin
To read the .OSM file in Rhino/Grasshopper, you would need the help of the Elk plugin. Elk is a set of free tools to generate map and topographical surfaces using open source data from OpenStreetMap.org and USGS. Elk will organize and construct collections of point and tag data from .OSM file so that you can begin creating curves and other Rhino/Grasshopper geometry.
Download the ZIP file containing all of the Elk and GDAL library files.
Right-click the ZIP file > Properties > make sure there is no "blocked" button
Unzip the downloaded file
In Grasshopper, choose File > Special Folders > Components folder.
Elk's Topography component uses the Geospatial Data Abstraction Library to read the GeoTIFF and IMG files so it will contain a larger number of files than previous versions. For this reason, it is recommended that you copy the Elk folder with all of its GHA and DLL files to this Libraries folder rather than the individual files.
Restart Rhino and Grasshopper
Find the Elk components under the ‘Extra’ tab in Grasshopper
Want to give back to the community while having a low-key side hustle ($90-$180/hr) to fund your habit? Join Wynter's panel. Take industry surveys, be compensated every time.
Step 03: Set up Rhino/GH script
Now that you’ve installed the Elk plugin, you’d use the 2 components - Location & OSMData.
The Location component is primarily for preprocessing all of the node or point data from the OSM export. It wants a file path to an OSM file as it's input and will output OSMPoints, a Point3d with an OSM defined ID, the text string of the full XML file, and the latitude and longitude domains.
The OSMData component is what you use to start organizing and collecting the data from the OSM file. It defaults to selecting Building elements but can be changed to select from any of the other map features in the OSM spec by right-clicking and selecting the feature type.
For the purpose of this demonstration and also for most practical use cases, you’d want to create at the least these 4 feature types - Highways, Leisure/Open, Waterways, Buildings. Using the 3D point collections output from OSMData component, you could create open and closed polylines where appropriate.
When selecting the ‘Buildings’ feature type, you’d also get an option to create 3D buildings along with the 2D polygons. The availability of 3D data is not guaranteed and may vary from place to place.
Step 04: Setup Rhino/GH to ArchiCAD workflow
Now that you have the urban context in Rhino/Grasshopper, you could generate the same in ArchiCAD using the Grasshopper-ArchiCAD live connection plugin. This plugin provides Architects/Designers seamless bi-directional interoperability between Grasshopper and ArchiCAD and allows for very creative computational workflows. After installation of the plugin, you’d find several nodes that allow you to convert native grasshopper geometry to ArchiCAD readable geometry.
The easiest way to move 3D building massing to ArchiCAD is by using the ‘Morph’ node since it can take any mesh as an input. Since the massing will be used for providing urban context to the project site, this is an acceptable method to quickly bring the 3D massing to ArchiCAD. All the 2D geometry that represents Highways, Waterways, 2D building boundaries etc., can be moved to ArchiCAD using the ‘Polyline’ node with the 2D viewpoint set to 0.Ground Floor.
Once you have a new file open in ArchiCAD, you can kick start the interoperability process by switching on the grasshopper connection (File → Interoperability → Grasshopper Connection). As soon as the connection is established with the active grasshopper file, geometry and data will start flowing in and you can see the 2D lines and 3D massing appearing in the file.
This is a quick and effective process to automatically generate urban context in ArchiCAD using Open Street Maps & Rhino/GH.