Search

Archive

BIL Files as Data Source

For our Gibraltar sample, we chose BIL files as our data source.

That's a format, which is in many ways similar to the BSQ format SBuilder uses to generate its BMP heightmaps from. As a consequence, we can skip other conversion steps, and instead use SBuilders undocumented import of BIL files, generating the BMP heightmap in one single step.

Skipping the creation of an intermediate BSQ has a little drawback, too. SBuilder can only use its "process" and "merge" tools on BSQ format files. Therefore we'll have to use a third party tool to merge our two BMP maps, so that a full LOD8 tile is covered!

Choose “File-->DEM tools --> BSQ to Bitmap conversion”.In order to see the BIL file at all, change the standard filetype selector from “HGT Files” to “All Files”. Select "n35w006.bil" as your input file.

A new window opens, in which you have to tell SBuilder the resolution of the tile selected and its filename. Our first file to import is “n35w006.bil”, and since we're working with SRTM3 data here, our thiles hold 1201 * 1201 pixels (higher resolution data, like SRTM1 for the USA, might come as 3601 * 3601 pixel tiles).

After clicking "Continue" you save the tile as "n35w006.bmp".

In many cases 1 tile might be enough to fill a LOD8 grid cell and create mesh. For our "Gibraltar" mesh we need 2 tiles. Therefore repeat the steps 1 - 3 for the second tile we downloaded, using the "n36w006.bil" file and saving it to "n36w006.bmp".

Merge the two BMP heightmaps with a graphics tool and save the merged tiles under the filename "n35-36w006.bmp".
I personally like to use the freeware tool "XnView" for that. It's useful for many other tasks, fast, knows a plethora of picture formats and makes merging two pictures a matter of few clicks (Tools --> Merge --> Vertical).

As a result you should now have a BMP file named "n35-36w006.bmp" which is 1201 pixels wide and 2401 pixels high.