Instructions for Reading Data on the TerrainBase CD-ROM ------------------------------------------------------------------- This CD-ROM contains 27 digital terrain models that cover various regions of the world. The models are stored in separate files in the "\DATA" directory and are named according to the specific geographic areas that they cover. The models consist of unprojected gridded data. The grid interval varies from model to model and ranges from 30-arc-seconds (highest detail) to 10-arc-minutes (lowest detail). Data files contain only Earth surface height values stored as 2-byte (16 bit) binary integers. The data can be displayed and converted into ASCII format by using the GeoVu software that is supplied with these data, or the data can be read directly from the CD-ROM. Header (.HDR) files in the "\DATA" directory contain all of the parameters needed for interpreting the data and assigning reference coordinates to the cell values. Refer to the GeoVu User Manual found in the GEOVU\TUTORIAL directory for definitions of the header file elements. The following pseudocode can be used to generate an XYZ file from the source data files. Variables in the code refer to parameters in the data header files. The code can be converted to any suitable programming language for convenience. ****************************************************** latitude = upper_map_y if (grid_cell_registration = "center of cell") then latitude = upper_map_y - 0.5 * grid_size(y) end while (rows <= number_of_rows) longitude = left_map_x if (grid_cell_registration = "center of cell") then longitude = left_map_x + 0.5 * grid_size(x) end while (columns <= number_of_columns) read (elevation) write (longitude,latitude,elevation) longitude = longitude + grid_size(x) end latitude = latitude - grid_size(y) end ****************************************************** The parameter "grid_cell_registration" is used to differentiate between two type of grids that are inclued in this release -- center of cell and grid intersection. The two terms are defined in the user manual. Note, that the boundary coordinates given in header files for center of cell grids is offset by one-half cell to the north and west. The user should compensate for this offset while assigning latitude and longitude values to the elevation data as is done in the above sample code. Here, the conditional statements are used to adjust the latitude and longitude values by one-half cell for center of cell grids. The user should note that there are no other differences between the center of cell and grid intersection registrations. Refer to the User Manual for more information on data format. ----------------------------------------------------------------