Drone mapping & Sun coverage simulation |
Created | ||
|---|---|---|---|
| Updated | |||
| Tags | architecture gis 3d sattelite data | License | MIT |
I'm building a house, which introduced me to gis and drone mapping so
roughly documenting my process here.
Goal of this has been get a 3d model of the land allowing for sunlight
coverage simulation for architecture and solar panel placement.
Click below to run the project in the browser, for some reason works great on mobile, github repo is here
A bunch of geotagged photos from the air can be stitched together into a map. With higher frequency of photos 3d reconstruction of the terrain is possible. I'm working with around 100 photographs taken from 200 meters away of roughly 40.000 square meters of land.
Mapsmadeeasy service provides a simple service for both of the things above and it works great. While I did run local workflows eventually I decided that it's easier to offload this to a third party.
I'm using qgis for processing geo information and maps. LLMs turned out great for tips on how to do more complex operations there.
High res drone photo map

Elevation tiff created by mapsmadeeasy

Topographic map for architects is easy once heightmap is available: `Raster` → `Extraction` → `Contour`

Tiff heightmap is just a 2D array, so it's easy to map it onto a 3d
plane.
I'm using GeoTIFF.js for tiff
parsing and three.js for
rendering.

Can slap any texture on top, so I add a drone photo

Enable shadow mapping, add a bump map for fun, use SunCalc library to calculate azimuth and height of sun for specific hour of the day

EU Copernicus program publishes all kinds of global geographical data, including a EEA-10 dataset that's an EU wide elevation map of 10x10m resolution.
All data is available online but a bit clunky to download, you'll need to register https://browser.dataspace.copernicus.eu/
Data comes in some kind of sentinel2 jp2 format. You can convert this to tiff using gdal
apt-get install gdal-bin
gdal_translate T34SGH_A040516_20230326T091116_B01.jp2 elevation.tif

I'm interested in a high resolution image of the land with low
resolution mountains, so I use two overlayed meshes with separate
textures)

I had to write some code to read the tiff coordinates and correctly translate those to opengl transformations so that I can import multiple tiffs and overlay them.
