Create an Urban Context Model in Rhino and QGIS

From TOI-Pedia


Expected Time: 120 min

In this tutorial, you will learn how to build a context model for your project using QGIS and Rhino with Geo-Data from PDOK.

Setup QGIS and Download Data

  • Download and Install QGIS
  • Install the Pdok Services Plugin
  • Add a simple base map to our project (pdok -> "grijs")
  • Define the project boundary by drawing a polygon on a new layer
  • Add a reference point for the Rhino import later on, on another new layer
  • Download the data from the PDOK Viewer
  • Import the data to QGIS by dragging and dropping the downloaded files

For detailed instructions for the steps above watch the video: Building a Context Model (1/5)

Filer, Clip, and Merge Data


Once the data is imported, we can start to filter the specific information that we are interested in.

  • Right-click on a layer and select "Filter"
  • Use the expression window to select sub-sets, e.g. "function" = "fietspad" if you want to filter bikepaths


Next, we can clip the filtered data to only include the data points within our project boudary.

  • Go to the vector menu and select "Geoprocessing Tools" -> "Clip"
  • For the input layer, use the filtered data and for the overlay layer use the project boundary
  • QGIS will make a new layer called "Clipped"


Some data, for example the bike paths, are made up of many small surfaces. In order to make them easier to work with later on in Rhino, it is important to merge them into one surface. This does not apply to points (e.g. tree data).

  • Go to the vector menu and select "Geoprocessing Tools" -> "Dissolve"
  • Use the clipped layer as an input
  • QGIS will make a new layer called "Dissolved"

For detailed instructions for the steps above watch the video: Building a Context Model (2/5)

Buildings and Export Layers to Rhino

In order to include buildings in your context model, there are two different ways:

  • Get building footprints and heights from QGIS Data
  • Download .obj files from 3DBAG

Buildings Method 1: QGIS Data

  • Create a WFS connection to 3DBAG within QGIS
  • Choose the LoD (Level of Detail) that you want and add the layer to your project by double clicking on the WFS connection
  • Clip and dissolve the layers as needed
  • Compute a new field (Right-click Layer, Open Attribute Table, Open Field Calculator) that substracts the base height (h_maaiveld) with the height of the buildings (usually the 70% field for the height works best)
  • Delete all the other fields in the attribute table (otherwise you will get an export error)
  • Use the "add Z value" function in the Processing Toolbox to add the newly created field to the z axis of your building geometry

Buildings Method 2: .obj Download

  • Download the tiles you need from the 3DBAG website
  • Drag the LoD (Level of Detail) that you are interested in onto your Rhino Canvas

Export to Rhino

  • Right-click on a layer you want to export and select "Export"
  • As a file format, choose "AutoCad DXF"
  • Make sure the reference system is set to the correct one (Amersfoort for a project in the Netherlands)

For detailed instructions for the steps above watch the video: Building a Context Model (3/5)

Rhino Import and Modeling

Import Layers

  • Drag and drop the first .dxf layer onto your Rhino canvas
  • Make sure to also include the layer with the reference point (this way, if you move your model but want to add new layers later you can always match the reference points to make sure your layers are in the right location)
  • The imported geometry is a hatch: use "DupBorder" to create a curve instead
  • Create a surface from the curve using "PlanarSrf"

Repeat the steps above for all your layers.


The hatches of the building layer are at different heights, because you added the Z value in QGIS.

  • Outline the hatches by using "DupBorder"
  • Use "ExtrudeCrv" to extrude all the building footprints to the bottom (negative z value). Make sure "solid" is ticked when extruding.
  • Cut off the buildings at ground level using a large surface or plane.


To make the model a bit more readable, you should add some depth and colors to the different layers.

  • To add depth, simply choose a surface and use "ExtrudeSrf" to give it thickness.
  • To add a color, create a new plastic material in the color you would like and assign it to the layer with your data.

Depending on the level of detail you need for your model, you can add extra elements and give streets, greenery, and bikepaths a thickness and color.


If you want to learn how to place a lot of trees automatically in your model, watch the video for the instructions to make your own grasshopper script.

For detailed instructions for the steps above watch the video: Building a Context Model (4/5)

Tips & Tricks

Watch the video below for a few handy tips & tricks:

  • Optimize your file management on your computer by using Temporary Scratch Layers and GeoPackages
  • Use Enscape to place more realistic trees in your model
  • Resolve the Rhino Error when importing complex and/or large layers

For detailed instructions for the steps above watch the video: Building a Context Model (5/5)

Final Model
Personal tools