Changing Bit-Depth to Float32

This guide shows you a couple of different methods for converting data to a bit-depth of 32-bit floating point (“float32”). Both methods begin with loading your data into QGIS, so it’s assumed you have installed QGIS and have some data.

If you haven’t yet got any source data yet and you’re just looking to follow the process, you can download the samples used in this guide.

Step 1

Load the data into QGIS:

  • Select the DTM data file in File Explorer and drag it into QGIS.
Step 2

Check the bit-depth of the DTM data:

TerraForm currently requires DTM data in 32-bit floating point format. This is the most common format for DTM data, but data does come in other format.

  • Double click the DTM file in the ‘Layers’ panel to pull up the ‘Layer Properties’.
  • In this example, the coordinate reference system “CRS” isn’t UTM, but the Units are meters, so we can use the data in this projection.
  • On the ‘Information’ tab, it says the data type is ‘Float64’, so we need to change it.
  • Click ‘OK’ to close the window.
Method 1: Translate

Translate the format to Float32:

If we’re just looking to change the bit-depth of the image, we can use the ‘Translate (Convert Format)’ function (that’s Method 1). If we’re clipping data too, we can change the bit-depth in the same process to save a little time (Method 2).

  • Select ‘Raster’ > ‘Conversion’ > ‘Translate (Convert Format)’.

In the ‘Translate (Convert Format)’ window that appears:

  • Set the ‘Input layer’ to your DTM file (it’ll be selected already if it’s the only data loaded).
  • Set the ‘Output data type’ to ‘Float 32’.
  • Click the button to the right of ‘Converted’, select ‘Save to File…’, then navigate to a location to export your data and give it a filename.
  • Hit ‘run’.
Method 2: Clip

Clip the DTM data and change the data type:

We can change the bit-depth of the data at the same time as clipping the image.

  • Select ‘Raster’ > ‘Extraction’ > ‘Clip Raster by Extent…’.

In the ‘Clip Raster by Extent’ window that appears:

  • Set the ‘Input layer’ to your DTM file.
  • Under ‘Clipping extent’, click the button to the right and select one of the options that fits best with how you’d like to clip the data. We used ‘Draw on Canvas’.
  • Set the ‘Output data type’ to ‘Float 32’.
  • Click the button to the right of ‘Clipped (extent)’, select ‘Save to File…’, then navigate to a location to export your data and give it a filename.
  • Hit ‘run’.
Result

Here’s what the Alaskan data looks like in UE4:

< PREVIOUS Re-Projecting DTM Data
NEXT > Merging Tiles of DTM Data
ARTICLE CONTENT