Creating a 3d Model for a Ski Hill in Aspen using QGIS

From CUOSGwiki
Jump to navigationJump to search

Introduction and Purpose

The purpose of this tutorial is to demonstrate how QGIS can be used to create a 3D model, and to demonstrate how to effectively create a model that will best represent what the user is trying to achieve. This tutorial shows how creating 3D models can be more effective for a map than a 2D map for certain situations. This tutorial uses the example of creating a map of a ski hill in Aspen. It has the ski routes, gondola routes and key points that are important for the map. This tutorial is meant for users who are brand new to 3D modeling but are also relatively experienced with QGIS and its main functions. This tutorial is meant for people with experience with QGIS but little to no experience working with 3D models.

Downloading Imagery from Earth Explorer

In order to access Earth Explorer, use this link: https://earthexplorer.usgs.gov/

To start, in order to create a 3D model, we need elevation data. This is because there is no 3D model without elevation data. For this tutorial, we are going to be creating a 3d model of a ski hill in Aspen, so to get this data, you have first to find Aspen on the map in Earth Explorer.

Earth Explorer Aspen.jpg

Next, once you find Aspen, create a study area using the "Polygon" feature found by scrolling down. Now, you can either input manual coordinates or click "Use Map" and manually select the points for your polygon.

PolygonEE.jpg

Once this is done, on the bottom of the page, select "Data Sets". For this tutorial, I used a Landsat Imagery DEM. You can select whichever Landsat dataset looks the best to you. Once you have your imagery selected, select "Results" and search for the proper imagery related to your area. You can do this by clicking on the foot-looking button next to each selection. This will show a polygon of each DEM image. Once you find one that surrounds an Aspen ski hill, you can download the imagery.

Datasetss.jpg EEResults.jpg FootImage.jpg

The Imagery should look like this:

Screenshot 2023-12-03 134416.png

Creating your Study Area

Once the data is downloaded, you can now input the dataset to QGIS. As you can see, this image will most likely be fairly large. You have to clip this image to just a ski mountain in Aspen, not include other areas. In order to do this, we first need a base map so that we can see the ski mountains in the area. First, download the QuickMapServices plugin on QGIS.

Qms.jpg

Once this is downloaded, it should show an icon of a little earth with a search bar on it in the Data Source Manager Toolbar. Now select the "Search QMS" option and then add the Google Satellite Hybrid base map. This will show Google Earth with Google Maps as well so you can find your ski mountain. Once you find a proper ski hill, first make sure it is within the DEM image. Once this is confirmed, create a polygon layer around the ski hill. After the polygon is created, Use the "Clip" tool to clip the DEM to the polygon that you created so that the DEM is only the size of the ski hill. This will create your study area for the 3d Model.

Qms search.jpg

Creating your Map

Once you have your study area, it is important to start georeferencing your lines and points for your 3d model. This can be done on the normal page of QGIS by creating line and point layers. In order to properly georeference the lines for the ski routes and gondola routes, make sure to use the Google Satellite Hybrid base map. This basemap includes the routes you need to add to the 3d Model. You can create multiple layers that represent each ski route's difficulty. The basemap includes black diamond (grey lines), blue (blue lines) , green (green lines) and the gondola routes ( red dashed line). Once you complete all these routes, make sure to change the size of the lines to what looks the best and input labels for these routes.


Once these steps are completed, your 2D map should look something similar to this:

2dMap(Updated).jpg

Creating your 3d Model

After georeferencing everything you need, you can now start to work on the 3D model. There are crucial steps that have to be taken to create a 3d model that looks good.

1. Download the plugin: Qgis2threejs

Qgis2three.jpg

2. Everything you change on the base page of QGIS will be affected in your 3d model. This is why it is important to do all of the georeferencing first to ensure you have everything you need for your model.

3. Now open Qgis2threejs, to do this click "Web" then click "Qgis2threejs" then click "Qgis2threejs Exporter".

Webb.jpg

4. Now, it is time to add your map to Qgis2threejs. To do this, click the checkmark for the DEM you wish to use. This will add the DEM with all the ski and gondola routes created.

DEM Selection.jpg

5. You will notice something wrong with the image, this is because the DEM is not clipped with the polygon. Even though you already did this, the plugin does not recognize it. To fix this, right-click the DEM and select properties. Once this is selected, select the checkbox next to "Clip DEM with polygon layer".

DEMProp.jpg ClipDEM.jpg

6. Now that everything is clipped properly with the 3D image, it is time to enhance the image to make it look better. You may notice that there is not actually a lot of elevation for your image. This can be changed in the "Scene Settings". To get there, select "Scene" in the top left section, then select "Scene Settings". This will bring up a menu, in this menu you can change the Z exaggeration. This will change how intense your elevation is. I would personally recommend 4 or 3 intensity. It brings out enough elevation to see the ski runs on the map, but it will not mess with the image too much.

Scene Settings.jpg Exaggeration.jpg

7. Adding a north arrow is the next step. To add the north arrow, click "View", then "Widgets", then "North Arrow". Once this is completed, a north arrow should appear on the bottom left of the screen.

8. Now that the north arrow is on the 3D model, the next step is to add a legend. This step is fairly different than when regularly using QGIS. First, create the legend that you desire in the layout of normal QGIS (not the Qgis2threejs plugin). Once you have your legend, go back into Qgis2threejs. Now that you are back click "View", then "Widgets", then "Header/Footer labels. Once this is selected, you will be brought to a screen that gives you the option to either type in a header or a footer. In the header section, type: <img src="legend.png" alt="Legend">. This will add a little box with a question mark at the top left of the screen. The only way the legend is going to appear, is if your PNG legend image is saved to where you are going to export your 3d model.

Header.jpg  


Your 3d model should look like these images so far:

3dmodelfront.jpg

3dmodelside.jpg

Uploading your 3d Model

Once your 3d model is created, your legend is ready, and the north arrow is working. It is time to upload the 3D model. In order to do this:

1. Select "File"

2. Select "Export to Web"

3. Set the output directory to the location in which you saved your 3D model

4. Set the HTML filename to what you please

5. Make sure to select "Enable the viewer to run locally". If you do not select this, you cannot run your 3d model.

6. Now select "Export"

7. Your 3D model should be created!

Here is what your 3D model should look like once it is uploaded as an HTML file:

Full3dmodel.jpg

3dmodelmiddle.jpg

Conclusion

The initial intent when creating this tutorial was to show that 3D maps are useful for certain situations regarding elevation data. When looking at the 3D model compared to the 2D map that was created, it is clear that it is easier to follow where the ski routes lead. With the 2D map, it would be hard to navigate to which route you need to go next. The 3D map provides all the direction needed to navigate yourself to the next ski route.

References

N/A(2023) Earth Explorer, https://earthexplorer.usgs.gov/ (Accessed: 20 December 2023).

Llaves (2018) Legend for 3D Maps · issue #121 · Minorua/qgis2threejs, GitHub. Available at: https://github.com/minorua/Qgis2threejs/issues/121 (Accessed: 20 December 2023).