• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Creating a region BGL using Google Earth

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
6,645
Country
us-wisconsin
Hi all.

A recent thread in the Ground2K/SBuilder forum had a problem of creating a tropical palm landclass. Luis Feliz Tirado provided a solution to create a local region BGL, then use orchard land class - 145 Deciduous Tree Crops to place the palm trees. Great solution.

Landclass files and region BGLs can also be made using Google Earth, the gdal_rasterize utility, and resample.

For your region, just make a polygon in Google Earth and save the KML file. I saved as doc.kml

gepoly.png


Using the gdal_rasterize utility, I entered the following command line to make a sourcefile for resample:

gdal_rasterize -burn 7 -of GTiff -tr 0.001 0.001 -ot Byte doc.kml MyRegion.tif

The result is a GeoTiff of the polygon. I then make an INF file (MyRegion.inf) for resample to use in converting the Geotiff to a BGL:

Code:
[Source]
Type = GeoTIFF
SourceDir = "."
SourceFile = "MyRegion.tif"
Layer = Region
SamplingMethod = Majority
MajorityMode = Simple
NullValue = 0

[Destination]
DestDir = "."
DestBaseFileName    = MyRegion
DestFileType = BGL
UseSourceDimensions = 1

Drag'n'drop the INF onto resample, and you get a region BGL from Google Earth.

myregion.png


Dick
 
Thanks for sharing!
 
I downloaded the GDAL package containing the utility.
I copied the .kml in the folder that gdal_rasterize resides, but when run the command line, there was a message "cannot find file" (or something like this).

So, I reverted to "old school" method (described in the original thread), but it would be useful to have this sorted as this method is much quicker/easier.
 
I think most developers are using OSGEO4W as a means to obtain gdal, grass, qgis... and install them with the proper paths in Windows. That would probably solve path and folder issues.

Dick
 
I downloaded OSGEO4w, but it seems that sfter the "express" install some needed dll's are missing.

Anyhow, when I rectify the installation, should I copy the .kml file into the rasterizer folder, the other way around or point to the full path of the .kml in the command line?
 
Back
Top