- Messages
- 6,645
- Country

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
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:
Drag'n'drop the INF onto resample, and you get a region BGL from Google Earth.
Dick
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
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.
Dick
