]> git.mxchange.org Git - flightgear.git/blob - Tools/README
First mostly successful tile triangulation works. There's plenty of tweaking
[flightgear.git] / Tools / README
1 FG Scenery Tools README
2 =======================
3
4 Contained here-in are the FG scenery creation tools.  These can be
5 used to convert 3 arcsec ASCII format DEM files and 30 arcsec binary
6 format DEM files into Flight Gear scenery.
7
8 Eventually these tools will expand to support insertion of airports,
9 roads, rivers, lakes, etc.
10
11
12 Building the Tools
13 ==================
14
15 These tools are compiled and tested under Linux.  I'm all for
16 portability, but I just haven't been as motivated to port these tools,
17 since scenery creation is less of a general need ... especially at
18 this stage.  However, if anyone wants to work on porting to other
19 platforms, I will be happy to incorporate patches.
20
21 The process for building these tools is very similar to building the
22 main FG source code.
23
24 1.  Set the FG_ROOT, FG_ROOT_SRC, and FG_ROOT_LIB environment
25     variables.
26
27 2.  Run ``make depend''
28
29 3.  Run ``make clean''
30
31 4.  Run ``make''
32
33
34 3 Arcsec ASCII DEM files
35 ========================
36
37 Data files for the USA are available in this format from:
38
39     http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html
40
41 To generate FG scenery from one of these dem files, run:
42
43     ./process-dem.pl <error-tolerance-squared> dem-file-1 [ dem-file-2 ...]
44
45 You can vary the error tolerance to control the level of detail (and
46 size) of the resulting scenery.  Note, you must specify the error
47 tolerance squared.  So, if you wish to allow up to a 10 meter error
48 margin (very high level of detail) you would specify a value of 100.
49 If you desire an error tolerance of 200 meters (medium detail level)
50 you would specify a value of 40000.
51
52 The process-dem.pl script will automatically dump the resulting .obj
53 files in the proper directory tree.
54
55
56 30 Arcsec Binary DEM files
57 ==========================
58
59 These data files have world wide coverage and are available from:
60
61     http://edcwww.cr.usgs.gov/landdaac/gtopo30/gtopo30.html
62
63 To process these data files, you must first run:
64
65     DemRaw2Ascii/raw2ascii <input_file_basename> <output_dir>
66
67 For example:
68
69     DemRaw2Ascii/raw2ascii /tmp/W020N90 asciidems/ 
70
71 This will create ASCII DEM files for each 1 degree x 1 degree area in
72 the specified output dir.
73
74 Then, you can take these ascii dem files and feed them through the
75 same procedure you use with the 3 arcsec dem files.