Processing images with GDAL and Mayavi2

Ok, this took a while but the results are not bad. So I guess it’s worth it.

First of all, a big thank you at [Ok, this took a while but the results are not bad. So I guess it’s worth it.

First of all, a big thank you at](http://www.gis.usu.edu/~chrisg/) who is very possibly unaware of the fact that I have been using his classes on Python and Open Source GIS. They give a good introduction into using GDAL with NumPy.

So after struggling a few consecutive days (frustration peaked!), I managed to load a Digital Elevation Model into the Mayavi 3D visualization tool. It’s still a bit rough and the peaks are a bit pointy, thus buildings look a bit weird, but still it’s another little step.

I first tried a Blender Tutorial that helped me out making this image:

Blender and Digital Elevation Model

Blender output

Then after that I figured that is a bit much work for something that in my opinion can be done more efficiently. The steps are still a bit stupid, because I exported a PNG of the DEM visualized with grayscale and then imported that into gdal and displayed that. So it’s still a bit dumb. And it isn’t really representative of the data types that a DEM contain. But the DEM itself only gave very weird visualizations, possibly because of the detail of the file as well as large negative values for NoData values.

Anyway it is a start:

Import with PNG and Mayavi2

Mayavi2 Output


Words by fritzvd

comments powered by Disqus