Based on input coordinates (degrees minutes seconds) this script will give a 3d plot of the place on the Dash platform. Currently it is only applicable for coordinates based on part 13 of the NGI map: http://www.geopunt.be/catalogus/datasetfolder/5be63750-0f1c-46e2-b60f-479a2b6cbcc7).
The script was based on this part of Belgium, because we knew that our coach would only give coordinates of his house during the live presentation of the project.
Coordinates: long: 51°12'19.8" lat: 3°13'17.0"
This project was the first soloproject we got during the ai data operator bootcamp at BeCode. The goal was to 'consolidate' our knowledge of certain packages (numpy, pandas, matplotlib) that we learned to use during the first month of the bootcamp. Working with new libraries was also part of the challenge. I made this script in the week from the 9th - 15th november 2020. Using python
The geotiff file used in the script is located inside the k_13.zip.
You can find it at: http://www.geopunt.be/download?container=dhm-vlaanderen-ii-dsm-raster-1m&title=Digitaal%20Hoogtemodel%20Vlaanderen%20II,%20DSM,%20raster,%201m
- Clone the repository on your local device
- Cd to the directory where the repo is located
- Create new virtualenv or activate your virtualenv
- run 'pip install -r requirements.txt' in your shell
- run 'mkdir data' in your shell
- Copy the DHVIIDSMRAS1m_k13.tif file from the k_13.zip to the 'data' folder
- run 'python model_3d_house_project.py' in you shell
- Take dms coordinates input(float) of user.
- Take DMS coordinates input (float) from the user.
- Convert DMS coordinates to decimal degree coordinates.
- Using pyproj, convert decimal degree coordinates to x, y Lambert 72 (EPSG 31370), as our GeoTIFF file is based on this coordinate reference system.
- Create a bounding box around the x, y coordinate.
- Open the GeoTIFF file using rasterio.
- With the rasterio package, read in the bounding box from the GeoTIFF file and save it to a variable.
- Make a pandas DataFrame out of the variable using geopandas or pandas.
- Make a 3D plot out of the DataFrame using plotly.