Flight Unlimited III high resolution terrain processing workshop

non-commercial FU3 support page - just to keep FU3 flying !

How to use srtm-1 high resolution elevation data for FU3


Introduction

The SRTM data sets result from a collaborative effort by the National Aeronautics and Space Administration (NASA) and the National Imagery and Mapping Agency (NIMA), as well as the participation of the German and Italian space agencies, to generate a near-global digital elevation model (DEM) of the Earth using radar interferometry. The SRTM instrument consisted of the Space borne Imaging Radar-C (SIR-C) hardware set modified with a Space Station-derived mast and additional antennae to form an interferometer with a 60 meter long baseline.

 

The DEM file (.hgt)  is provided as 16-bit signed integer data in a simple binary raster. There are no header or trailer bytes embedded in the file. The data are stored in row major order (all  the data for row 1, followed by all the data for row 2, etc.). All elevations are in meters referenced to the WGS84 EGM96 geoid as documented at http://www.nima.mil/GandG/wgsegm/. Byte order is Motorola ("big-endian") standard with the most significant byte first. Since they are signed integers elevations can range from –32767 to 32767 meters, encompassing the range of elevation to be found on the Earth. In these preliminary data there commonly will be data voids from a number of causes such as shadowing, phase unwrapping anomalies, or other radar-specific causes. Voids are flagged with the value -32768.

 

the srtm-1 data from the nasa project are available at ftp://e0mss21u.ecs.nasa.gov/srtm/

 

the you will see a long list of zip files ordered by lat / long coordinates of the bottom left corner ( N45E005.hgt.zip for 45north/05east ). Select the zip files of the area of interest

 

SRTM-1: 30m grid at equator, datamatrix 3601 x 3601

SRTM-3: 90m grid at equator, datamatrix 1201 x 1201

 

For FU3 computation we need Intel data format. for a decimal value of 26 we have 0x1a hex in Motorola format: “00 1a” and in Intel format:  “1a 00” and remember world size of 1 FU3 megatile is 16384m x 16384m. You will have to crop an area of this size or multiple of it.

 

The conversion is made using an excellent and easy to use tool DEM2BSC.EXE.

 

you will find this freeware at:  http://www.ptsim.com/downloads/DEM2BSQ.ZIP  look for DEM2BSQ.ZIP

 

Preparation of the needed files

You can download GeoTilesViewer v3.1 122KB right here. You are using this freeware tool at your own responsibility !

  1. Download the .hgt.zip files of the area you want and unzip the .hgt file to a work folder
  2. place a copy of DEM2BSQ.exe in this work folder and run it.
  3. Select Convert HGT Cell and select the .hgt file, the new file is named .bsq
  4. Now you can view the data by choosing View a BSQ Cell or Convert BSQ to Bitmap.
  5. You can crop the bitmap and reload it to a bsq file using Convert Bitmap to BSQ
  6. Merge a BSQ Cell and Crop a BSQ Cell until you get the final megatile area or multiple of it (6 x 5)
  7. Eliminate the voids (-32767) using BSQ Processing   and selecting the options
  8. Upsize to 1 arc using Up/Down Sample BSQ.
  9. View the final BSQ Cell and note the rows/columns  values
  10. Close DEM2BSQ and start GeoTilesViewer 3.1
  11. Choose Terrain Export enter filename, rows/columns of bsq area and corresponding megatiles have BSQ selected and click on Convert this will create the elevation map for FU3 in tga format.
  12. Starting from the bottom left corner cut 257x257 squares and preserve the overlap of  top row / right column as start position for the next square !
  13. Import all the named square (e0xxyy.tga) using GeoTilesViewer.  
  14. The water areas are not flat for this unedited srtm data so you must flatten lakes or sea parts. You can do this by painting the water area in the e0xxxx.tga with a unique colour of the elevation. Generate the colourscale from the script section of GeoTilesViewer to select the elevation wanted zoom  in the result file es2000.tga. never interpolate by graphic method ! Results are unpredictable.. An other way is to export a part of the megatile elevation as MD3 file ready to use with Gmax, see tutorial. Adjust lake border so water is not on the hill and import it back from MD3 format. Look at MD3 Tutorial how to do this.

In this tutorial we will use the first 30 megatiles of the Switzerland region

The megatile range is from bottom left aaaa to afae so we have a rectangle of 6 x 5 megatiles.

Now we have to find the coordinates for this area of  98.304km by 81.92km use a map or any geographic tools for that. (Size = 6*16.384km x 5*16.384km)

For this coverage we need 6 .bsq files: N45E005.BSQ, N45E006.BSQ, N45E007.BSQ, N46E005.BSQ, N46E006.BSQ, N46E007.BSQ. Using Merge and Crop we put all together and applied the final crop for the exact area limit by trial and error. Process and expand to 1 arc second then save the large result file (23MB) as aafec.bsq.

The BSQ parameters for aafec.bsq are: 2660 rows and 4576 columns.

Open GeoTilesViewer Terrain export section and enter the values for the BSQ process, then convert.

The new Output file is aafecBSQ.tga using the FU3 elevation scale. The size of this file is set for the 6x5 megatile elevation file, 5*256+257 = 1537 wide and 4*256+257 = 1281 height.

A single square with partial view of the lake of Geneva before and after correction of the lake altitude.

Real picture and FU3 view of Emosson lake.


under construction last update 14.aug.2005


Information: André Meystre
back to FU3 Terrain Workshop      next to Terrain height modification using gmax®