Local: BglView2 downloads update1 update2 end
What a mouth full ;=)) Global Self-consistent, Hierarchical, High-resolution Shoreline! But what a beautiful database ...
I was not sure this had much to do with FlightGear, but do note there is a gshhs module in TerraGear utilities, but not so sure it is used in the creation of the current 1.0.1 FlightGear scenery - it has some problems, see next page, but ...
What a fantastic Global Self-consistent, Hierarchical, High-resolution Shoreline database, maintained by http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html ... I had first come across this back in about 2004, and still have copies of this version 1.3 dataset. It has now augmented to version 1.6 ... and comes with C sources to extract the data.
This image is from their web site ...
The GSHHS data and software are available via anonymous ftp.
12/20/2007 06:46AM 9,190 README.gshhs 04/02/2007 12:00AM 80,787,138 gshhs_1.5.zip 12/20/2007 06:45AM 111,033,828 gshhs_1.6.zip 04/02/2007 12:00AM 14,135 gshhs_1.8_src.zip 12/20/2007 06:45AM 14,863 gshhs_1.9_src.zip
I downloaded the gshhs_1.6.zip dataset, containing -
Directory of C:\Projects\gshhs\data_1.6 20/12/2007 06:41 163,448 gshhs_c.b 20/12/2007 06:41 88,762,768 gshhs_f.b 20/12/2007 06:41 20,165,024 gshhs_h.b 20/12/2007 06:41 4,933,880 gshhs_i.b 20/12/2007 06:41 1,066,488 gshhs_l.b 20/12/2007 06:41 71,448 wdb_borders_c.b 20/12/2007 06:41 6,035,296 wdb_borders_f.b 20/12/2007 06:41 1,030,056 wdb_borders_h.b 20/12/2007 06:41 400,696 wdb_borders_i.b 20/12/2007 06:41 145,952 wdb_borders_l.b 20/12/2007 06:41 1,329,616 wdb_rivers_c.b 20/12/2007 06:41 21,753,168 wdb_rivers_f.b 20/12/2007 06:41 5,775,128 wdb_rivers_h.b 20/12/2007 06:41 2,697,608 wdb_rivers_i.b 20/12/2007 06:41 1,543,640 wdb_rivers_l.b 15 File(s) 155,874,216 bytes
And then downloaded the gshhs_1.9_src.zip, containing -
Zip file: gshhs_1.9_src.zip Length Size Ratio Date Time Name ------ ----- ----- ---- ---- ---- 4317 1993 54% 28/08/2007 08:40 gshhs\gshhs.c 2869 1402 52% 28/08/2007 08:40 gshhs\gshhs.h 11501 3659 69% 27/08/2007 15:00 gshhs\gshhs_dp.c 7494 2739 64% 05/10/2007 08:18 gshhs\gshhstograss.c 1586 525 67% 26/11/2007 09:37 gshhs\makefile 9413 3675 61% 28/08/2007 08:32 gshhs\README.gshhs ------- ------- --- ------- 37180 13993 63% 6
I used MS Visual C++ 2005 Express edition (MSVC8) to compile the gshhs.c source. It is ALWAYS a pleasure when it compiles cleanly, first off. MSVC8 did issue some 'warnings', but these were easily dispensed with ...
As the readme.gshhs points out, the datasets available are :-
gshhs_f.b Full resolution data gshhs_h.b High resolution data gshhs_i.b Intermediate resolution data gshhs_l.b Low resolution data gshhs_c.b Crude resolution data
Of course, after compiling, and testing the simple supplied ASCII output module, I used the 'technology' contained therein to create my WIN32 version, with additional features I wanted to try. One of them was to output the results into a Windows bitmap ... it seems to me it is always BETTER to visually 'see' the information extracted.
This is the result of combining gshhs_f.b, wdb_rivers_f.b, and wdb_borders_f.b, painting the coastline in black, the rivers in blue, and borders in brown ... using a projection based on a simple ilon = lon * cos(lat) ... obviously better viewed in full size - this full size version also has FlightGear data information added, so is not 'just' GSHHS ...
Of course, the detail is seen MUCH better if maximum and minimum latitudes and longitudes are used, and the results scaled up -
The above is with the following input file passed to gshhs_win ...
-bmp=testbmp16.bmp -bpp=4 -border+ -grid+ -minlat=49 ; minimum latitude -maxlat=55 ; maximum latitude -minlon=-1 ; minimum longitude -maxlon=10 ; maximum longitude -l ; do NOT output ASCII points -scale=80 ; scale up 80 times -p- ; mercator OFF ; database files ..\data_1.6\gshhs_f.b ..\data_1.6\wdb_rivers_f.b ..\data_1.6\wdb_borders_f.b
The source of this application is contained in this ZIP, and a WIN32 executable in this ZIP ... see downloads below for sizes and MD5 context. Although this source uses 'file mapping' as available in WIN32, it could fairly easily be converted to run in unix/linux or other OS platforms.
I long time back I had created an application to extract scenery information from Microsoft Flight Simulator BGL scenery files, to be able to 'see' what they contained. That produced an 'interesting' display - example :-
But OH, how this is greatly enhanced by adding the GSHHS data in the background ...
Adding the coastline really shows we are viewing the bottom of Italy's boot, which is NOT at all obvious from just the numbers. This is using gshhs_f.b, the full resolution data ... now all I need is a way to fill the 'water' with a soft blue, and the land with a soft brown ...
The source of this 'messy' WIN32 application is contained in this ZIP, and a WIN32 runtime module in this ZIP ... see downloads below for date, size and MD5 context string ...
Thursday, February 28, 2008 - February 04, 2008.
As ALWAYS, take due care with downloading and running executables from the web!
|gshhs_win-04.zip||22/03/2008||506,865||Source of gshhs_win.exe - need zlib for .gz reading.||1e57ca598d93a86f3fc679a60f450155|
|gshhs_wine04.zip||22/03/2008||65,018||WIN32 runtime of gshhs_win.exe (see below)||76b1788e95476e69bbc4c569cbf79531|
|Older Version - not recommended|
|gshhs_win-02.zip||2008/02/28||352,052||Source of gshhs_win.exe||c1247a902713981252549ed52b4acd0f|
|gshhs_wine02.zip||2008/02/28||24,053||WIN32 runtime of gshhs_win.exe||b358e058564b0031af8e8f5a87308e5b|
|BglView - quite old, messy application - not recommended|
|BV2-006.zip||2008/02/28||137,235,188||Source of BglView2||2e7d2464dca91deb41cc54ab018ae46e|
|BV2e006.zip||2008/02/28||428,612||WIN32 runtime BglView2.exe||c029716043903abc6eda5535ceeee39b|
Update: 20080315: Although this is primarily an application to 'view' GSHHS data, I have enhanced to include some more FlightGear (FG) dataset information. This included linking into static zlib, to directly decompress the FG .gz data file. This is a 'green' view of Charles De Gaulle airport, Paris, France taken from a recent apt.dat.gz, which is in fact the same data used in X-Plane ...
If you 'know' the airport, you can even sort of 'see' the round building ;=) All the FG dataset handling code in the application gshhs_win.exe can be turned OFF by adding #define NO_ADD_FG_DATA in say gshhs_vers.h. Then all the FG options and actions are completely removed, and only GSHHS data is loaded and displayed ...
Update: 20080321: And since this area was the recent subject of a discussion on FlightGear development board, could not resist adding another combination of GSHHS data (the black island outlines), and FG data (within the green) for Hong Kong International airport (VHHH) -
It will be interesting to compare this with both vmap0 and/or SRTM data, when I get around to it ...
The next page, gshhs-02.htm, are some more experiments using this GSHHS database as the 'Default' landmass outline in TerraGear...
EOP - GSHHS-01.doc