external links: index . projects . FlightGear . home

in-file links: preamble - help - downloads - building - images - end


FlightGear scenery is made up of many special binary scenery files, and constructed from many other types of (array) files. This is a windows attempt to 'visually' view such files. Of course you are 'viewing' the scenery files, in 3D, every time you run FlightGear, but here I wanted to view the contents as a 2D line drawing, using the windows native display context.

Because some files can contain thousands of points, joined up into triangles and polygon, this poly-view can be quite slow. It could be sped up using either an OpenGL display, or indeed MS own DirectX technology, but that has NOT been done.



'poly-view' has a command line HELP dialog, seen by using -? command...

Usage: poly-view [options] file/dir
  Version 1.0.3 date 12 May, 2011, compiled on May 12 2011, at 12:49:06
  --nudge=<float> = this will be applied to following files/dirs.
  --work-file=<poly-file> = alternate to list following...
  --work-dir=<directory> = <ditto>
  Map options, overriding default, the INI values...
  --autozoom=<yes|no> or --enable-autozoom or --disable-autozoom
  --zoom=<float> = will also set autozoom off
  --color=<yes|no> or --disable-color or --enable-color = no color changes
  --join-points=<yes|no> or --disable-joint-points or --enable-joint-points
  --join-last=<yes|no> or --disable-joint-last or --enable-joint-last
  --fg_scenery=<path> - path to FG scenery root.
  --neighbors=<yes|no>, --disable-neighbors or --enable-neighbors
  --fg-root=<path> - path to FG base data.
  --palette=<file> - palette file for map coloring.
  --disable-scene-fill or --enable-scene-fill(def)
  --disable-poly-fill or --enable-poly-fill(def)
  --disable-paint-X or --enable-paint-X - to paint each point as an X
  --set-spread-x=<num> - If above enables, use this spread value.
  --center-lon-lat=<float:float> = Center the scene on these coordinates.
  --disable-line-size or --enable-line-size (def) - vary line size per zoom.
  --disable-scenery/--enable-scenery = g_use_fg_scenery = 0/1(def).
  --disable-scenery-paint/--enable-scenery-paint = g_enable_scenery = 0/1(def).
  --enable-scenery-wsg84 and/or --enable-scenery-normals = set these addition 
  on. default = off.
  --enable-join-points/--disable-join-points = g_join_poly_points = 1/0(def) 'j' 
  --enable-paint-fit-points plus --enable-paint-fit-tris, or disable (def).
  --enable-paint-buckets, or disable (def).
  --verbosity=<num> - set LOG output verbosity. Default = 0.

  Arguments following the options will be taken as a load directory and/or file list...
  NOTE: At least one VALID file, or directory MUST be given.

The essential idea is to pass in a directory, or file, and poly-view will attempt to display it as a 2D line drawing. Of course it can fail ;=))



Some downloads ... as usual, take care downloading and running things from the web. It is highly recommended that you download the source, and compile it yourself. Microsoft offers an 'Express Edition' for free, of their C/C++ IDE tools ...

Downloadable source and binaries for WIN32
Date Link Size MD5
2011/05/12 poly-view-08.zip 543,419 2fcae35291fefc5e5d99e47402c57d68
2011/05/12 poly-viewe08.zip 203,132 261850b672fd6f4022b4b6dcd8bfe4a1




Unfortunately building poly-view is not that straight forward, since it has several important dependencies, like SimGear, PLIB, which are part of FlightGear, libjpeg, libpng, etc. All these dependencies must be built first. I hope in a later updates to also include the so called '3rdparty' static libraries, to save you this step, but it all takes time ;=))

Further the executables are built with MSVC8 (2005) using the MS DLL runtimes (/MD and /MDd), so in certain machines they will report missing DLLS. Usually this can be fixed by downloading, and installing the appropriate runtime DLLS.



To be able to keep the 'view' generated, poly-view has a built in 'screen-dump' function - F3 - and below is an example of a set of elevation arrays (*.arr.gz and *.fit.gz), of an area around Sydney (YSSY) -

poly-view around Sydney, YSSY

Obviously the latitude and longitude are shown, together with the index value of each SimGear 'bucket'. This is how FlightGear scenery is made up of - <chunk>/<tile>/<bucket> - although this can sometimes be written as <chunk>/<1x1>/<tile> or <index>.

The <chunk> - a 10x10 degree area; the <tile> - a 1x1 degree areas - the <bucket> - the dimensions vary with latitude, but is around 1/8 of a degree square, and each buck is represented as an 'index'. You can see Sydney international airport is in 5426688. Thus that scenery would be found in the scenery folder e150s40\e151s34, in the file 5426688.btg.gz, together with e150s40\e151s34\5426688.stg file, and the actual airport YSSY.btg.gz.

Approximately this same areas as this 2d view can be viewed in FlightGear's 'mapserver' with this link. Or this link in Google Maps... but there is nothing like a clean line drawing to 'see' what is there...


Have fun ;=))

checked by Tidy  Valid XHTML 1.0 Transitional