grid

The terrain grid tool grid creates an ESRI Shapefile containing MSFS tiles at the specified level of detail, bounded by coordinates or shapes in a vector file. Such grid can be used as a reference when designing terrain or preparing aerial imagery.

You can also crop cells to bounding coordinates or shapes (-crop) and write them to separate files (-separate).

Tiles in the output file will be polygons, each with the following attributes:

AttributeDescription
FORMATAlways “MSFS”. May change in the future.
QUADSo-called quad key string uniquely identifying tile level and position
LEVELTile’s level of detail
COLTile’s column number at the current level
ROWTile’s row number at the current level

Refer to Bing Maps Tile System for a description of detail level and column/row coordinates.

Usage

msfs grid [-help] [-formats]
          (-bounds lon_min lon_max lat_min lat_max | -border file)
          -level 1..20 [-crop] [-separate]
          outshp

-formats
Shows a list of all currently supported file formats.

-bounds <lon_min lon_max lat_min lat_max>
Bounds of the area tiles should be generated for (in WGS84 decimal degrees). Alternatively, you can use -border.

-border <file>
Vector file with polygons to define the area tiles should be generated for. All tiles that fully or partially intersect with polys in the file will be written to output file. ESRI Shapefile or Google Earth KML format is recommended.

-level <1..20>
Detail level of the tiles. See Bing Maps Tile System for description.

-crop
Crops cells to bounds or border. Use when you only want those parts of cells that are within bounds/border, and not full cells.

-separate
Writes each cell into a separate file.

outshp
Output file name for the shapefile with tiles. When using -separate, add variables to the name to ensure that each file is unique. Available variables: ${QUAD}, ${LEVEL}, ${COL}, ${ROW}.

Examples

Create a level 15 grid covering Lower Manhattan:

msfs grid -bounds -74.020591 -73.968185 40.696523 40.733357 -level 15 "C:\Dev\lower_manhattan_LOD15.shp"

Create a level 15 grid covering Lower Manhattan and split it into separate files, one for each cell:

msfs grid -bounds -74.020591 -73.968185 40.696523 40.733357 -level 15 -separate "C:\Dev\manhattan_${COL}_${ROW}.shp"

Create a level 15 grid that covers all polygons in “my_airport.shp”:

msfs grid -border "C:\Dev\my_airport.shp" -level 15 "C:\Dev\my_airport_grid.shp"