Data Formats - aeheathc/LaharPlot GitHub Wiki
This page specifies the formats for data interchange. For a description of how these files are used, see the Data Flow Overview. The file extensions mentioned here are the ones created by LaharPlot -- they are not necessary for data going into any of the utilities. The asterisk in the filename pattern represents the base filename chosen by the user which an executable will use for all output files.
External data; binary. See the page on DEM.
This is a simple heightmap output by the stream finder for use by the inundation zone mapper. It contains ONLY a list of heights, which might be integers or floating point numbers, since the precision of input DEM data will vary. As the "Tab Seperated Values" extension implies, it is an ASCII text file. Individual values are seperated by the Tab character. Lines are seperated with a Unix linebreak; that is, a single \n.
700 690 680 690 700 690 680 670 690 700 680 670 660 680 700 670 660 650 670 690
The metadata file gives information about the Simplified DEM and stream data needed to understand what the numbers represent. This is an ASCII text file in the INI format. It contains [bracket-enclosed] section headers and key=value pairs. This allows for compatibility with readily available INI parsers (hint: Boost.program_options provides this functionality as well as command line option parsing.) Comments are denoted with a hash character (#).
[Core] pixel_size=10.0 x_pixels=979 y_pixels=1398 [Display] origin_x=557815.000000 origin_y=5121975.000000 projection=PROJCS["UTM Zone 10, Northern Hemisphere",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.978698213898,AUTHORITY["EPSG","7008"]],TOWGS84[-3,142,183,0,0,0,0],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] #The projection tells you how to interpret the origin x,y points. SDTS files will have a UTM projection. #In the case of UTM, the interesting data from the projection line is the Zone number.
This is a matrix of integers 0~7 representing the direction of flow for each cell. It has the same dimensions as the DEM. As the "Tab Seperated Values" extension implies, it is an ASCII text file. Individual values are seperated by the Tab character. Lines are seperated with a Unix linebreak; that is, a single \n. This system starts at north and goes clockwise, same as navigational heading. 0 - north, 1 - northeast, 2 - east, 3 - southeast, 4 - south, 5 - southwest, 6 - west, 7 - northwest.
2 3 4 6 6 2 3 4 6 6 3 3 4 5 6 3 4 4 5 6
This is a matrix of integers representing the number of cells in the DEM that flow into each cell. It has the same dimensions as the DEM. As the "Tab Seperated Values" extension implies, it is an ASCII text file. Individual values are seperated by the Tab character. Lines are seperated with a Unix linebreak; that is, a single \n. There is no indication of what the "threshold" should be for considering a cell to be part of a stream. Only the user can decide that. The values near the edge are less certain that the values near the middle.
- WARNING: The max value is very large! DEMs are indexed with int, so the highest flow total is (int.max)^2. This value can't fit in anything smaller than a longlong.
0 1 2 1 0 0 1 7 1 0 0 0 8 1 0 0 1 12 1 0
A boolean matrix indicating areas that will be inundated by the lahar. 0 - safe, 1 - covered. It has the same dimensions as the DEM. Multiple files will be sequentially numbered, hence the question mark in the filename which would be replaced by the number. As the "Tab Seperated Values" extension implies, it is an ASCII text file. Individual values are seperated by the Tab character. Lines are seperated with a Unix linebreak; that is, a single \n.
0 0 1 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0