aerial

The aerial imagery tool aerial reprojects and cuts any GDAL-supported imagery into MSFS-compatible PNG tiles.

Export region can be defined through a bounding box (-bounds) or by providing a vector file containing polygons (-border). All tiles overlapping with any polygon will be exported. In addition, a blend mask will be automatically generated for them to ensure smooth blending near polygon edges. ImageMagick can be used to apply color-correction (-magick).

Imagery is loaded in alphabetical order, one source at a time, layered from bottom up. Multiple sources may be defined with wildcard-supported filemasks. Last-defined source will be added on top of previously loaded imagery.

First three channels are assumed to be RGB. Alpha is ignored. All imagery must be in the same projection, but may differ in resolution.

Tip
You can use imagery loading order to edit selected regions of the imagery (eg erase buildings). Using imgex tool, extract the areas you want to edit and make necessary changes. Then list them in -imagery after all other files. This loads edited images on top of the original imagery.

Usage

msfs aerial [-help] [-formats]
            -imagery filemask [filemask ...]
            (-bounds lon_min lon_max lat_min lat_max | -border file)
            [-level 1..21 | -res m]
            [-blend m] [-magick cmd]
            [-threads num] [-epsg code] [-resample algo] [-meta]
            dest
-formats
Shows a list of all currently supported file formats.
-imagery <filemask> [<filemask> …]
A list of one or more aerial imagery files to use (wildcard supported). Recommended format is GeoTIFF.
-bounds <lon_min lon_max lat_min lat_max>
Export area bounding box in WGS84 decimal degrees. All tiles within these bounds will be written to PNG. Alternatively, export area may be defined with -border.
-border <file>
Vector file containing polygons that define the export area. All tiles overlapping with these polygons will be written to PNG. Recommended vector file formats are ESRI Shapefile or Google Earth KML. Choose this or use -bounds.
-level <1..21>
Detail level for the PNG tiles. See Bing Maps Tile System for description. Alternatively, you can use -res to automatically find the closest level.
-res <m>
Resolution in meters per pixel for the PNG tiles. Closest level of detail will be automatically calculated. Use -level to manually set output level.
-blend <m>
Blend radius in meters, used only with -border. PNG tiles will be blended with the environment by this amount at polygon edges (default: 30 meters).
-magick <cmd>
ImageMagick commands to run on the tile after it is created, eg -brightness-contrast -10x5. You can use this to apply color-correction. See ImageMagick command-line options for commands recognized by ImageMagick. ImageMagick must be installed on the system to use this feature and available through PATH variable (see Environment variables).
-threads <num>
How many CPU threads to use for processing (default: all).
-epsg <code>
Projection of input imagery expressed in EPSG code (eg 4326 for WGS84). Overrides auto-detected projection.
-resample <algo>
Resampling algorithm to use when reprojecting the imagery (default: lanczos). See GDAL for a list of all supported algorithms.
-meta
Writes metadata for the PNG files. This allows to open them in general purpose GIS software for viewing.
dest
Output folder for PNG tiles.

Examples

Take TIF imagery from “C:\Projects\MyAirport\Imagery” folder, reproject and cut it into 1 meters per pixel resolution tiles covered by polys in “imagery_area.kml”, and save PNG tiles to “C:\Projects\MyAirport\Tiles”:

msfs aerial -imagery "C:\Projects\MyAirport\Imagery\*.tif" -border "C:\Projects\MyAirport\imagery_area.kml" -res 1 "C:\Projects\MyAirport\Tiles"

Same as above, but loads imagery from two different folders:

msfs aerial -imagery "C:\Projects\MyAirport\Imagery\*.tif" "C:\Projects\MyAirport\Tweaked Imagery\*.tif" -border "C:\Projects\MyAirport\imagery_area.kml" -res 1 "C:\Projects\MyAirport\Tiles"

See Aerial imagery tutorial for a full walkthrough from setting up the toolkit to compiling aerial imagery into the final redistributable add-on package.