Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Tutorial: Easy import of a ground polygon from Google Earth

Featured Replies

This post aims to help anyone creating basic airports, using Google Earth to trace ground area polygons. My specific use case: I have identified 25 airports in Canada's Northwest Territories and Nunavut, that are still not included in MSFS 2020, even though that sim was released almost 6 years ago. These are dirt-and-gravel strips bulldozed out of the native surface (tundra, permafrost, or whatever was there), and on Google Earth, it's easy to see the perimeter of the graded area; it's generally a tan to light brown color, and of course all the trees have been removed. It's too laborious to transcribe the coordinates for the vertices from Google Earth, and manually type them in one at a time in the Scenery Designer, so here's a better work flow. First off, you will need Google Earth on your PC, if you don't already have it, and a text editor that has "Block Select Mode". TextPad has this, and you can download it from several places on the 'net. I use Text Pad v4.0; there are newer versions, but I've never felt the need to upgrade. Once you've installed it, you access "Block Select Mode" in the "Configure" pull-down of the main menu. You will need this to re-configure polygon vertex data from Google Earth.

Okay, now here's the actual workflow:

  1. Create your airport in the Scenery Designer, then place the Runway(s) using lat/long coordinates from Google Earth for the centerline heading and overall length.

  2. Create a simple 4-sided Polygon around the airport's general area, then set the attributes to exclude vegetation, and set the appropriate material and color (gravel, grass, dirt, etc). Don't worry about the exact positions and coordinates of the vertices, you will be overwriting them with Google Earth numbers.

  3. Find your airport on Google Earth, then create a Polygon, of however many sides and vertices you need, that covers the desired area; in my case, the total area that was graded to remove trees and create the runway, ramp area, and parking lot. In Google Earth, set this polygon to be just the outline, without fill color. Name this polygon something you can remember, usually the airport name, with "ground poly" appended. Now, click the "Save Scenery" button in the Scenery Editor window. Save the Polygon as a KML file to the root folder of the airport's SDK Scenery folder tree.

  4. In Windows Explorer, Navigate down the Scenery folder tree to the folder where your scenery XML source file lives. [Airport Project Root] > [PackageSources] > [Scenery] > [your airport project name] > [scenery] > [your airport's ICAO.xml]. Copy this file to the Desktop as a backup in case something goes haywire. Open the source XML file with TextPad, then scroll down until you find the Polygon you created in Step 2. Take note of the exact syntax of the XML code that defines the vertices of the polygon, you will need to duplicate this in the next couple of steps, exactly as it's shown in the Scenery Design source file. If the Polygon data is there, close the Project in the SDK Project Editor. If it isn't there, go back to the Scenery Editor and click "Save Scenery" again, reload the file into TextPad, and if it now looks good, close the Project. You are going to be manually manipulating this file in the next several steps, and you don't want it to be open in the SDK Project/Scenery editor when you do this.

  5. Now open the KML file from step 3 in another TextPad window. It helps if you are doing this on a desktop PC with 2 or 3 monitors; if you have multiple monitors, have the Scenery Design source file on one monitor, and the KML file from Google Earth open on the second monitor. Scroll down in TextPad until you get to the data section with the polygon vertices.

Now here's where you need to do some data manipulation, and you will now find out why you needed a Text Editor with "block select mode". The first thing you will probably notice is that the FS2020 SDK Scenery source file lists the coordinates of the Polygon vertices with Latitude preceding Longitude, like this:

<Vertex lat="73.01039815595590" lon="-85.06242575464277"/>

<Vertex lat="73.01045739611199" lon="-85.06338988452819"/>

But when you look at your Google Earth KML file, the vertex coordinates are reversed, with Longitude preceding Latitude, and all on one continuous line, like this:

<LinearRing> -85.06496482104024,73.01027119730628,0 -85.06530450640419,73.00930469725016,0 -85.06301619198243,73.009041719816,0 -85.06119918730036,73.0087537054918,0 -85.0516528..........

These are the steps you need to follow to re-format the KML data so you can copy it into the Scenery Source file:

  1. In Text Pad, under the Configure menu, set Word Wrap mode. The data will no look like this:

<LinearRing>

-85.06496482104024,73.01027119730628,0 -85.06530450640419,73.00930469725016,0 -85.06301619198243,73.009041719816,0 -85.06119918730036,73.0087537054918,0 -85.05165289266428,73.00670576431472,0 -85.04330821520668,73.00485228295746,0

  1. In this example, the "-85's" are all Longitudes, the "73's" are Latitudes. The first thing to do is pad any of the coordinates that are short, with extra zeroes at the end, to make them all the same character length. This is essential for using "Block Select Mode".

  2. Go down the list and add a carriage return/line feed (using the Enter key) at the end of each coordinate.

    The data will now look like this:

    -85.03823750423923,73.00382200296775,0

    -85.03778603609133,73.00350055634115,0

    -85.03718214840056,73.00338098881501,0

    -85.03535327195833,73.00299144730749,0

  1. The extra '0' at the end of each line is the elevation, you can now delete it from each line (just delete the zero, leave the comma).

  2. Now, switch TextPad to "Block Select Mode", and draw a selection block around all of the Longitude numbers, and hit CTRL-X to "cut" them to the clipboard.

  3. Now place the cursor at the end of the first line and hit CTRL-V. The data should now look like this:

73.00120451092420,-85.02731795006505,

73.00151274992268,-85.02693774189574,

73.00175121653570,-85.02719804405363,

73.00280683410942,-85.02649060748708,

  1. Use Block Select to grab all of the commas on the ends of the lines and delete them.

  2. Now you will use the 'Find and Replace' tools in TextPad to add the 'Vertex', 'lat', and 'lon' Tags to the coordinate data, so that you end up with this:

<Vertex lat="73.00930469725016" lon="-85.06530450640419"/>

<Vertex lat="73.00904171981600" lon="-85.06301619198243"/>

<Vertex lat="73.00875370549180" lon="-85.06119918730036"/>

<Vertex lat="73.00670576431472" lon="-85.05165289266428"/>

You need to be very careful here; the syntax, spelling, and punctuation has to match exactly what the compiler expects, or the file will not Build into a finished Package.

  1. If you are sure you haven't made any errors in adding the tags to the coordinate data, you can now import the modified vertex data from the KML file into your Project Scenery Source [ICAO].xml file. Select all of the modified vertex data lines from the KML file and hit CTRL-C to copy them to the clipboard. Now, switch to the Project Scenery Source [ICAO].xml file, and highlight the four existing Polygon vertex data lines, then hit CTRL-V to paste/overwrite them with the Google Earth polygon data. Hit CTRL-S to save the file.

  2. Re-open the Project in Scenery Designer, re-open the Scenery Editor, and hit "Load This Asset Group". Now look at the airport in Camera Top Down view mode. Zoom out until you can see the whole airport. If you did everything correctly, you should see that the random 4-sided Polygon you originally created as a placeholder, has been replaced with the actual airport outline polygon you created in Google Earth. If you get any error message, or the "Load This Asset Group" command fails, there is probably made an error in Step 8. Look very closely at the syntax and punctuation; the tiniest boo-boo, like a single quote where the compiler expects a double quote, or a missing '/>' or '=', will cause the compiler to crash.

  3. If everything looks good, proceed with the rest of the scenery design, then compile the way you usually do, either with the 'Build' command in the SDK, or the command-line compiler (my preferred way).

These instructions may seem complicated, but they do allow you to import a Google Earth polygon with an unlimited number of vertices into the Scenery Designer, with no other tools except Google Earth itself, and TextPad (or any other text editor that supports Block Select Mode). You don't need QGIS or other fancy 3-D ESRI shapefile tools to do this, since these Exclusion polygons are two-dimensional. Once you master TextPad and how to use Block Select Mode and the Find and Replace tools, it's pretty easy and intuitive.

NOTE: I have only tested this procedure in the FS2020 Scenery Designer. It should work the same in FS2024, but I can't guaranty it.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.