CampusWest.noiseTwin()
is a prototype iTwin Viewer developed on Bentley System's iTwin Platform to address noise pollution. It was created during the Prototyping Project in the third semester of the Construction and Robotics master's track at the RWTH Aachen University.
The viewer aims to represent in 3D how noise affects the future buildings on the Campus West expansion of RWTH Aachen University.
The iTwin Viewer includes the following features:
- 3D visualization of the noise impact on buildings,
- selection of the building of interest,
- the ability to change the time of day,
- animation over the different times of day,
- zoom-in functionality to the building of interest,
- minimum and maximum decibel reading of the building of interest,
- tooltip for the building of interest,
- a color scheme based on the decibel level,
- contextual information about surrounding streets and buildings.
CampusWest.noiseTwin_example.mp4
Follow the steps from the Get Started! - Tutorials | iTwin Platform guide.
-
In step 2. Get the code :
- Clone this repository instead.
-
In step 3. Register an Application:
- Register the single page application (SPA) and fill out the missing
IMJS_AUTH_CLIENT_CLIENT_ID
in the.env
file.
- Register the single page application (SPA) and fill out the missing
-
In step 4. Create an iModel:
- Under 6. select Empty iModel and then choose the File Synchronization tile from iModel Home.
- Upload
buildings_3857.geojson
from your project folder indata/qgis/data
. The synchronization might take 5 to 10 minutes.- You have just geolocated your iModel.
- The iModel has to be geolocated so that the iTwin Viewer can visualize the buildings at the correct coordinates.
-
In step 5. Run the code:
- Obtain the
IMJS_ITWIN_ID
andIMJS_IMODEL_ID
values:- Go to My iTwins and open your iTwin.
- In IModels click the three dots on the IModels tile and select CopyIds.
- Obtain the
The iTwin Viewer requires a Bings Maps key and a Cesium access token in the .env
file:
# Api key for Bing Maps
IMJS_BING_MAPS_KEY = ""
# Access token for Cesium
IMJS_CESIUM_ION_KEY = ""
-
For the
IMJS_BING_MAPS_KEY
variable, you can obtain a Bing Maps key from Bing Maps Dev Center.- More information on Bing Maps Keys.
-
For the
IMJS_CESIUM_ION_KEY
variable, you can obtain a Cesium access token from Cesium ion.- More information on Cesium ion Access Tokens.
These keys provide a context map, terrain, and surrounding buildings.
Run npm install
and then npm start
in the folder where you cloned the repository.
Installs the required dependencies.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
To create your own visualization data for the iTwin Viewer:
The required data for the visualization in the iTwin Viewer is generated using a QGIS project, the plug-in opeNoise and the PyVista library.
Filename | Description |
---|---|
qgis_project.qgz | QGIS project file with the required layers. |
qgis_receiver_points_height_generation.py | Script that creates a height_m field in the receiver points layer and duplicates all points by updating the height_m field according to the building height. |
buildings_3857.geojson | Building footprints as polygons required for decibel levels calculation. |
receivers_3857.geojson | Receiver points required for decibel levels calculation. |
roads_3857.geojson | Emitters required for decibel levels calculation. |
Masterplan_Campus-West_modified_3857.tif | Relevant part of the Campus West Masterplan. |
openose_calculate_noise_levels_settings.xml | Settings for the decibel levels calculation. |
pyvista.ipynb | Jupyter Notebook to view and organize the data from QGIS according to the data structure required for the visualization in the iTwin Viewer. |
You can use the QGIS project located in data/qgis
it comes with:
- buildings layer
Buildings_3857
, - receivers layer
Receivers_3857
, - emitters layer
Roads_3857
.
These layers provide the necessary data to conduct a noise calculation with the plug-in opeNoise.
-
How the plug-in works can be seen here.
-
The settings for the calculation can be loaded from the
openose_calculate_noise_levels_settings.xml
file. -
Before issuing
Calculate Noise Levels
you can run the scriptqgis_receiver_points_height_generation.py
to create a height attribute for the receivers. -
To create new polygons representing buildings you have to always start with the lowest right corner first moving in a clockwise direction!
-
All polygons have to constitute four points and four points only!
Install the dependencies from the environment.yml
file.
Export the Buildings_3857
and Receivers_3857
layers in a .geojson
format from QGIS.
Put them in data/pyvista/data
and run the script in pyvista.ipynb
.
The script creates the necessary .ts
files with the data from the .geojson
files ready to be used for visualization in the iTwin Viewer.
- The iTwin Platform currently does not support more than one AnalysisStyle per viewport.
- More information on AnalysisStyle on multiple Decorators turns black · iTwin · Discussion #17 · GitHub.
- If calculations for a certain point in the
Receivers_3857
layer fail the value will be -99.0 and needs to be adjusted. With the current datasetbui_id: 20
,id_pt: 63
, andid_pt: 282
usually fail. - After calculation, the attribute of the receivers layer
Receivers_3857
should be renamed fromLgeneric
toLden
.