FSX KML

From FSDeveloper Wiki
Jump to navigationJump to search

Introduction

Before and after screenshot

FSX KML is a freeware scenery design tool for Microsoft Flight Simulator X (FSX).

It converts KML (Keyhole Markup Language) files generated by Google Earth into FSX scenery.

Using Google Earth to draw polygons and polylines you can accurately and easily create the following types of "vector" based scenery:-

  • Water polygons including oceans, rivers, lakes and canals
  • Islands inside water features
  • Irregular shaped landclass polygons for cities, parks, beaches, forest, golf courses etc
  • Airport boundries and flatten polygons
  • Shorelines
  • Streams
  • Roads and road bridges
  • Railways and rail bridges
  • Freeways (ie Moving traffic)
  • Utility lines (eg power and telephone lines)
  • Exclusions polygons

Additionally FSX_KML can also:-

  • Place scenery objects (from the FSX library) along a polyline
  • Create landclass and waterclass “tiles” (1.2km sq)
  • Create a FSX flight plan along a polyline

Downloading FSX KML

The latest version of FSX KML can be downloaded from the following sites:-

http://www.innovasoftware.com/fsx/fsx_kml_102.zip

Installation

Installing FSX KML

FSX KML can be installed in a folder of your choice. Simply unzip the FSX KML installation zip file into the desired folder.

After unzipping the installation file you should have the following files:-

  • FSX_KML.exe
  • ShapeLib129.dll
  • FSX_KML_TAGS.XML

Installing the FSX Software Development Kit (SDK)

To generate FSX scenery you will need the FSX SDK. If you purchased the deluxe version of FSX then you already have the SDK. Otherwise you must download the SDK from the Microsoft FSX website

If the SDK is not installed in the default SDK folder you must specify its location on the FSX_KML build tab.


Building Scenery

Building your own scenery with FSX KML is easy.

Step 1 - Creating a KML file with Google Earth

The first step in creating your FSX scenery is to create a KML file by using Google Earth to "trace" scenery features.

Creating polygons and polylines

Although you can use the free version of Google Earth (GE), by far the easiest way to create polygons and polylines is by using the $20 plus version of GE.

Using GE Plus create a polygon using the "Add Poly" function or create a polyline using the "Add Path" function, and then trace the scenery feature (for example a lake or road).

"Tagging" the scenery features

To describe what scenery feature your polygon or polyline represents it needs to be "tagged". The file FSX_KML_TAGS.XML contains a list the tags you can use.

There are two ways to tag a polygon or polyline:-

  • Place the name of the tag in the description field of the polygon or polyline
  • Place the name of the tag in the description field of the parent folder that contains the polygon or polyline. If a polygon/polyline has no tag then it will inherit its tag from the parent folder.

Step 2 - Processing the KML file with FSX KML

The Project tab
The Build tab
  • Run FSX_KML
  • On the "Project" tab, click the "Add KML" button and choose a KML file. The contents of the selected KML file will be displayed. You may add multiple KML files. A FSX BGL file will be generated for each KML input file.
  • Change to the "Build" tab
  • Set the following build options:-
    • "FSX folder" - Input the folder where FSX is installed. By default this is "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X"
    • "Terrain SDK" - Input the location of the FSX terrain SDK
    • "Run SDK tools" - If you select this option FSX KML will automatically run the SDK tools to turn your Shape Files into a FSX BGL
    • "Copy generated scenery to FSX Addon Scenery Folder" - If you select this option FSX KML will copy the generated BGLS to the FSX addon scenery directory
  • Click the "Build" button. FSX KML will now build your scenery. The progress of the build will be displayed in the build log window. The following actions will occur during the build:-
    • For each KML file in your project
      • An appropriate set of Shape files is generated depending on the features that have been tagged in the KML
      • An XML config file is created for use by Shp2Vec
    • A batch file called "Run_SDK_Tools.bat" will be created. This batch file contains the appropriate commands to call the SDK tools (Shp2Vec and Resample)
    • If you have selected the "Run SDK Tools" option then the Run_SDK_Tools.bat file will be executed. This will turn the Shape files into BGL scenery files
    • If you have selected the "Copy generated scenery..." option then the BGL files(s) will be copied to the FSX addon scenery directory

Step 3 - Testing the scenery

  • If you selected the "Copy generated files..." option then your scenery will have been copied to the FSX addon scenery folder. Simply run FSX and goto your scenery location to test the scenery

Scenery Design Tips

Creating a coastline with beaches

  • Draw a polygon representing the ocean. "Tag" it with a ocean water polygon tag
  • Draw a polygon representing the beach. "Tag" it with a sand landclass polygon tag

Creating a road with moving traffic

  • Draw a polyline to represent the road. If your road is going to have "one way" traffic then the traffic will travel from the start of the line (1st point you draw) to the end of the line (last point you draw)
  • "Tag" the polyline with a road polyline tag
  • "Tag" the polyline with a traffic polyline tag

Creating a river with islands

River with islands
  • Create a folder in your KML to hold the river
  • Draw a polygon representing the river. "Tag" it with a river water polygon tag
  • Create a sub folder to hold the islands. "Tag" it island with the special "ISLAND" tag
  • In the sub folder draw polygons for each island in the river

Creating a bush landing strip

Standard airports in FSX always appear flat and without sloping runways. But there is an easy way to create sloping bush landing strips using landclass polygons.

  • Draw a polygon that will represent a grass clearing. "Tag" it with a grass landclass poly tag
  • Draw a smaller polygon inside the first one that will represent the landing strip. "Tag" it with a dirt landclass polygon tag

Creating exclusions

Because your scenery is added to the existing FSX scenery it is important to exclude existing scenery features that are replaced by your new scenery. For example, if you have created an improved version of a river using water polygons you will need to exclude the existing water polygons in the FSX scenery, otherwise they will clash visually with your new scenery.

For example, to exclude water polygons:-

  • Draw a polygon that covers the area you wish to exclude
  • "Tag" the polygon with a waterpoly exclusion tag

Placing FSX scenery objects along a polyline

Todo - Not implemented in version 1.00

Creating landclass and waterclass “tiles”

Todo - Not implemented in version 1.00

Creating a FSX flight plan along a polyline

Todo - Not implemented in version 1.00

Editing a KML file using FSX_KML

Using FSX_KML you can easily edit your KML file. The following types of edits can be performed:-

Copy

To copy a KML item (folder or polygon/polyline) select the item to copy and click the copy button.

Delete

To delete a KML item select the item to copy and click the delete button.

Edit

To edit the Name and Description attributes of a KML item select either a single item or multiple items (hold the shift key to multi-select) and then press F2 to display the inline editor. Enter the new value and press enter. Your edit will be applied to the items you selected

Saving your changes

Click the save button to write your changes back to disk.

Open in Notepad

Click the "Open in Notepad" button to open the selected KML file in Notepad.

Open in Google Earth

Click the "Open in Google Earth" button to open the selected KML file in Google Earth.

Reload a KML file

If you have edited the selected KML file using an external program (eg Google Earth or Notepad) then you can reload those changes back into FSX_KML by clicking the reload button.

FSX_KML_TAGS.XML

FSX_KML_TAGS tab

What is the FSX_KML_TAGS file?

This file holds the "tags" that are used in the KML file to describe FSX scenery features. You can customise this file to add more tags or change existing ones.

An easy way to browse this file is by clicking on the "FSX_KML_TAGS.XML" tab in FSX KML.

This XML contains the following attributes for each "tag":-

  • Tag - The unique identifier for this scenery feature. This tag is what you use to "tag" the polygons/polylines in your Google Earth KML file
  • Description - A description of the scenery feature. This description is displayed in FSX KML.
  • Feature Type - The type of scenery feature and must be one of the following types:-
    • WATERPOLY - Water polygons such as coastline, rivers, lakes, canals etc
    • WATERPOLYGPS - Low resolution water polygons for use in the GPS
    • PARK - irregular shaped landclass polygons for towns, forest, beaches, park etc
    • AIRPORTBOUNDRY - define airport boundries and also flatten areas
    • EXCLUSION - exclude default scenery from the polygon
    • STREAM - create streams
    • SHORELINE - create animated shorelines
    • ROAD - create roads and road bridges
    • FREEWAY - create moving traffic
    • RAILWAY - create railways and rail bridges
    • UTILITY - power lines, telegraph lines, fences etc
  • GUID - The FSX GUID for the scenery feature.

Please refer to the FSX "terrain.cfg" file and terrain SDK documentation for futher information on feature types and GUIDs

Editing FSX_KML_TAGS.XML using FSX KML

The FSX_KML_TAGS.XML file can be easily edited in FSX KML. To following edits can be performed:-

Copy

To copy an item select the item to copy and click the copy button.

Delete

To delete an item select the item to delete and click the delete button.

Edit

To edit the Tag, Description, FeatureType or GUID attributes of an item select either a single item or multiple items (hold the shift key to multi-select) and then press F2 to display the inline editor. Enter the new value and press enter. Your edit will be applied to the items you selected

Saving your changes

Click the save button to write your changes back to disk.

Open in Notepad

Click the "Open in Notepad" button to open the FSX_KML_TAGS.XML file in Notepad.

Reload

If you have edited the FSX_KML_TAGS.XML file using an external program (eg Notepad) you can reload those changes by clicking the reload button.

Google Earth

The free version Google Earth may be downloaded from the Google Earth home page

I strongly recommend you purchase the $20 “Plus” version of Google Earth because it makes creating polygons and polylines very easy.

Freeware scenery created with FSX KML

If you wish your scenery to be listed here please send an email to fsx_kml@innovasoftware.com

End User Licence

Copyright © 2006 Innova Software ALL RIGHTS RESERVED

This software program is distributed without charge to other scenery designers, redistribution of the original ZIP file is allowed. You are NOT allowed to sell this software or ask money for its distribution.

This software may be used free of charge for the production of both freeware and commercial sceneries subject to the following conditions:-

  • You notify the author of the use of FSX KML in your scenery product
  • You give the author a free copy of your scenery (and any updates)
  • In your readme file you say that FSX KML was used to help with your scenery production

Please contact the author at fsx_kml@innovasoftware.com to discuss further.

The copyright and any intellectual property relating to this software the property of the author.

The software distributed in this way may represent work in progress, and bears no warranty, either expressed or implied.

Release History

v1.00 Beta - 19th 0ct 2006

This is first beta release of FSX KML

v1.01 Beta - 19th 0ct 2006

Issues resolved:-

  • Fixed error with FSX_KML_TAGS.XML file not found

v1.02 Beta - 21st 0ct 2006

Issues resolved:-

  • Fixed error reading polygon/poylines. FSX KML could sometimes insert an erroneous point of 0,0

Known issues (Features not implemented in this release):-

  • No tutorial.kml is supplied
  • ISLAND tag
  • Freeway tags (moving traffic)
  • Place scenery objects (from the FSX library) along a polyline
  • Create landclass and waterclass “tiles” (1.2km sq)
  • Create a FSX flight plan along a polyline

Development Roadmap

The following features are planned for upcoming releases:-

v1.03

  • Better handle tags in description field. Be less strict about "whitespace" and cr/lf
  • Add more excludes to fsx_kml_tags.xml (see tags starting with "exclude__")
  • Add support for moving kml items up/down
  • Add support for moving kml items via drag drop
  • Add support for creating new kml folder
  • Create shapes in order they appear in the KML
  • Assign UUID (starting at 1) to each shape in the KML based on its order in the KML
  • Add output directory - write to it instead of default directory
  • Add support for "holes" in polygons, eg making islands in rivers

v1.04

  • Add support for multiple tags per KML item
  • Add support for tag parameters (eg elevation and freeway traffic data)
  • Add pop up editor for KML item tags. This is needed to allow easy entry of multiple tags and tag parameters

v1.05

  • Add support for traditional landclass tiles (1.2km sq)

v1.06

  • Add support for placing of FSX library objects either along polyline or at place marks
  • Add support for placing FSX library objects inside a polygon. Allow number of objects and elevation to be specified. Objects will be distributed randomly within the polygon. This can be used to populate livestock, wildlife, boats/ships in harbors, people on beaches, birds, hot air balloons etc
  • If possible add support for conditional display of FSX library objects based on various triggers such as date/time, weather conditions and probability factor. For example, this would allow harbors to be populated with pleasure craft on sunny warm days, but not at night or in cold weather. Would allow forest fires to be generated in hot, windy conditions.

v1.07

  • Add support for flight plan generation along polyline

Feedback

Discuss FSX KML at the fsdeveloper.com FSX KML forum post

You can email the author directly at fsx_kml@innovasoftware.com