|
|
High!
Another step towards Khyberspace... but at the moment, I'm once again
hampered by obviously misunderstood technology!
About one year ago, by a posting of Christoph Hormann's latest
achievements in Earth modeling I was informed about the newly published
data files of the Shuttle Radar Topography Missions (SRTM), showing the
At ftp://ftp.glcf.umiacs.umd.edu/glcf/SRTM/Degree_Tiles the single
1-degree tiles are downloadable for free - in the format of 1200 x 1200
GeoTIFFs. Unfortunately, although they look very much like 16-bit
heightfield bitmaps for PoV-Ray, their height scale definition is
completely different, so that PoV-Ray cannot interprete them in a
sensible way.
As I did not (yet) found any understandable definition of the GeoTIFF
standard, I had to content myself with converting them into ASCII
matrizes with a vertical resolution of 1 metre.
The program I used for this is 3DEM, available at
http://www.visualizationsoftware.com/3dem.html (according to all I know,
there is no Linux version of it!). The converted GeoTIFFs then are
simple tapeworms of 1,440,000 six-digit float values in clear text,
separated by blanks, without any CRs and LFs.
As PoV-Ray I/O directives accept only ASCII files with commas as
delimiters, I had to replace those blanks by commas using the "replace"
utility of Linux, which worked perfectly.
Then, after some problems with the standard mesh object, Jerome M.
Berger (thank you, Jerome!) suggested me to use mesh2 instead, I
rendered a first test version of a spherical mesh2 of GeoTIFF tile
N34E068 (the geographically inclined among us are inviting to look it up
in their favourite atlas ;-)).
But the result was weird, obviously the float values in the ASCII matrix
are arranged in a different way than the pixels in the GEO-TIFF file.
Attached are the mesh2 rendering and an 2D map generated with 3DEM
showing how the terrain should look instead.
For better comparability of the land features, I placed a waterline at
2500 metres elevation in both images.
The code is available on p.b.s-f
See you in Khyberspace!
Yadgar
Post a reply to this message
Attachments:
Download 'iotest-n.png' (67 KB)
Download 'n34e068.jpg' (38 KB)
Preview of image 'iotest-n.png'
Preview of image 'n34e068.jpg'
|
|