Skip to content

A noise pollution iTwin Viewer prototype developed on Bentley System's iTwin Platform

License

Notifications You must be signed in to change notification settings

g3rezz/noise-itwin-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CampusWest.noiseTwin()

A Noise Pollution iTwin Viewer

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.

Features

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.

In Action

CampusWest.noiseTwin_example.mp4

iTwin Viewer Setup

1. Get Started

Follow the steps from the Get Started! - Tutorials | iTwin Platform guide.

Additional Notes

  • 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.
  • 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 in data/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 and IMJS_IMODEL_ID values:
      1. Go to My iTwins and open your iTwin.
      2. In IModels click the three dots on the IModels tile and select CopyIds.

2. Add the Geospatial Data Keys

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 = ""

These keys provide a context map, terrain, and surrounding buildings.

3. Run the iTwin Viewer

Run npm install and then npm start in the folder where you cloned the repository.

npm install

Installs the required dependencies.

npm start

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.

Documentation

To create your own visualization data for the iTwin Viewer:

Data

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.

QGIS

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 script qgis_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!

PyVista

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.

Limitations

iTwin Platform AnalysisStyle

QGIS Plug-in opeNoise

  • 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 dataset bui_id: 20, id_pt: 63, and id_pt: 282 usually fail.
  • After calculation, the attribute of the receivers layer Receivers_3857 should be renamed from Lgeneric to Lden.

Next Steps

About

A noise pollution iTwin Viewer prototype developed on Bentley System's iTwin Platform

Topics

Resources

License

Stars

Watchers

Forks