Topographical map of Bergen, Norway.
That web page helped me a lot:) http://www.navimationresearch.net/tag/heightmap/
Data source
The height map of Bergen with 10 m resolution was downloaded from http://data.kartverket.no/download/.
Data conversion
*.dem file from kartverket was converted using GDAL software to PNG format. The PNG file contained different shades of gray, corresponding to different heights. The following command was used for conversion:
gdal_translate -scale 0 700 -of PNG *.dem heightmap.png
where scale sets 0 meters height to black and 700 meters height to white.
Building of the mdel
The 3D model was built with OpenSCAD using the surface() function. The function transforms PNG file to a 3D profile.