How to use the ground type editors.

By Marty Schultz

April 28, 2000

Last update: May 1, 2000
Thanks to Richard Harvey and Scott Johnson at TRI for info on the editors.

Note: The ground type information generated by the editors does not change the appearance of the coastlines in Fly!, it changes where you can land or where you splash down.  For accurate looking coastlines you will need an image of the area to import as scenery.  You really only need to do this if you want to land somewhere in Fly! where the default ground type is water.  Islands and peninsulas smaller than a few miles wide are not in the default low resolution ground type data.

You'll need at least 200MB of free disk space to do this.

First download 2 databases (anonymous ftp) from:

ftp.ngdc.noaa.gov

in the /MGG/shorelines directory

files:

gshhs_c.b.gz
gshhs_f.b.gz (about 60MB, unzips to about 85MB)

I had to use an ftp client, Netscape added something to the files (probably carriage returns) making them much larger and unusable.

Make a "coast" and a "data" folder in your main Fly! folder.

Unzip the gshhs_*.b.gz files and put them in Fly!\coast.

Start the ground type editor and use option 2 to run the old style editor.

Hit "c" and type "prime gshhs_f.b gshhs_fw.b" (enter).
This wraps the data around the prime meridian.  The gshhs_fw.b database is the one the editor will use.

Wait for it to finish, takes a while, you're reading an 85MB file and writing another 85MB file.

Hit ESC to exit the old style editor, once you make the gshhs_fw.b file you will not have to use the old style editor again unless you accidentally delete it.  From now on to make coastlines start with the "option 1" step below.

You may want to mark these *.b files as read only so you don't accidentally delete them when cleaning out the coast folder.  The coast folder gets filled with hundreds of files that will be deleted after you put some of them in an epd file.  The editor will make many .b files for it's own use so it's easy to get them mixed up.  Search the windows help file if you don't know how to make a file "read only".

Now use option 1 for the interactive editor.

Goto the tile you want to make coastlines for:

Hit "c" and type "goto globe tile xxx zzz" (enter).
For example to goto tile 205, 160 use "goto globe tile 205 160".
If you have a black screen use the cursor keys, shift up, shift down, a, and q, to change your view of the ground.  These work similar to the way they do when in slew mode and external camera view in Fly!.

Now make a database for just this global tile:

Hit "c" and type "add coastlines" (enter).

After a few minutes you should see the new coastline drawn in white in the window. See picture at the bottom of the page.

Now make the ground type files:

Hit "c" and type "slice" (enter).
If the editor asks if you want to reuse existing .gtp files hit "N".
You should see colored squares popping up over your scenery in the window, these indicate what type of ground is being added to the .gtp files.  Blue for all water, green for all land, and grey for a tiles with mixed land/water.  See picture at the bottom of the page.

At this point you should have lots of .gtp files in the coast folder, these are the files Fly! will use.

If you are making coastlines for more global tiles go back to the Goto step and do the "add coastlines" and "slice" steps.  I would recommend doing one global tile at a time, if your scenery covers multiple global tiles you can list multiple coast epds in your scenery .scf file.

Make an epd for the coastline data using the file manager and use option 5.  Give the epd a name and use a unique volume name. (all epd files need to have different volume names or Fly! will not load them)

Put the epd in your scenery folder and include it in your scenery .scf file.

Example: If you named the epd 205160c.epd you would add the following lines to your .scf file.  Use tabs not spaces in front of each line.

    <file> ---- pod file ----
    205160c.epd

Remove all the files in Fly!\coast EXCEPT the gshhs*.b files.
 

Optional low resolution data only:


To save disk space you can use low resolution data only.  After slicing there is one hxxxzzz.gtp file and many t*.gtp files.  The t*.gtp files are detailed polygons for the "mixed" type tiles.  The hxxxzzz.gtp file is 64x64 bytes with one byte for each normal tile in the global tile xxx zzz.  Each byte is a 1, 2, or 3.  1 is for all land, 2 is all water, and 3 is the mixed type.  When Fly! sees a type 3 tile it will look for the t*.gtp file for that tile.  If you change all the 3s in the hxxxzzz.gtp file to 1s, you only need to include the hxxxzzz.gtp file in your epd and not the t*.gtp files.  One way to do this is to load the hxxxzzz.gtp file into a graphics program as a raw greyscale file and do a color swap (change all color 3 pixels to color 1).  If you have any 3s in the file and don't have the corresponding t*.gtp file Fly! will give an error message when you enter the area.

FYI, the bytes in the hxxxzzz.gtp file are arranged starting with the lower left corner of the global tile and proceeding by row.  If you load the file into Paint Shop Pro and change the colors to make them visible it looks like the land in the global tile rotated 90° to the right, this is because PSP puts 0,0 in the upper left corner.

The ground type file for global tile 205, 160 (h205160.gtp) in Paint Shop Pro with color 3 shown white:

You can see Block Island in the upper left with Martha's Vineyard below.

The coastlines over some TerraScene scenery:

Slicing:

There are other commands that work in the interactive editor:

"save" saves unsliced coastline data for current global tile.
"load" loads unsliced coastline data for current globe tile.

"s" changes selection mode.
"m" activates the mouse.
"d" deletes the selected vertex or polygon.
"v" moves a vertex.

After using "slice" using "dump" will take all the *.gtp files and generate ESRI shape files that can be viewed in a program called ArcExplorer.
ArcExplorer is available as a free download from www.esri.com.