blosm icon indicating copy to clipboard operation
blosm copied to clipboard

Custom Terrain Elevation Source

Open JeremyBYU opened this issue 5 years ago • 2 comments

I have another feature request 😄 , It would be awesome if we could provide a custom terrain elevation source that your plugin could use. For example, many digital terrain models (DTMs) are distributed as GeoTIFF's, which is basically a raster (picture) that is georeferenced. This makes it possible for us to create a higher fidelity terrain model than what SRTMv3 is currently providing (30m).

It looks like the current code is pretty well separated between:

  1. Downloading the elevation data source - app/__init__.py - initTerrain(self, context, addonName):
  2. Creating the vertices and indices that define the terrain - app/__init__.py - def buildTerrain(self, verts, indices, heightOffset)
  3. Constructing the terrain mesh from the vertices and indices - app/__init__.py - def importTerrain(self, context):

So in theory the biggest change we would have to make is creating a custom buildTerrain function that creates the list of verts and indices. A user interface would be provided that allows the user to specify GeoTIFF file, activating the custom buildTerrain function and needed switches.

Now the biggest issue is once again is going to be the binary dependency of reading a GeoTIFF file (GDAL). We can handle this a similar way by providing a another custom blender plugin that exposes GDAL.

We can skip the GDAL dependency if we dont support GeoTIFF and only 2D numpy arrays with the user provide Affine matrix and srid.

JeremyBYU avatar Aug 01 '18 18:08 JeremyBYU

It would be nice to have that feature. The GUI could look similar to OSM:

  • import from the server
  • import from a file

vvoovv avatar Aug 03 '18 12:08 vvoovv

Yep, just what I was thinking.

JeremyBYU avatar Aug 04 '18 20:08 JeremyBYU