newUsing QGIS to prepare NDunes cartography

Cartography source files, either Digital Elevation Models or satellite images are georeferenced. To add georeferenced data into NDunes, these data must be in the EPSG:4326 WGS84 coordinate system. This coordinate system covers the entire world and is used in GPS.

Importing layers in QGIS

Simply drag & drop layers files in QGIS:

An elevation layer imported in QGIS

QGIS may be unaware of the source coordinate system used when importing the layer. This is the case in the example above. We can notice the small question mark icon aside the layer name indicating that QGIS does not know which system to use to interpret that layer's data:

Click on that icon to select the right coordinate system in QGIS

The prompt panel shown by QGIS to choose the coordinate system we wish to use

In our example, elevation files were defined in the RGF93 Lambert 93 so we'll pickup that system.

Warping layers to WGS84

Go to Raster / Projections / Warp:

Look for the warping tool

And fill-in the requested parameters for the warping:

The warping tool

The most important is to make sure that the source and destination coordinate systems are correct: the destination must be EPSG:4326 - WGS84. If the source has been set, it appears already in brackets around the filename and does not need to be respecified in the panel. Then, it's important to check the "Bilinear (2x2 kernel)" option for the resampling method. This'll avoid stairsteps artifacts in warped images. We also must have a "-99999" value (this is the default QGIS) for regions of the image where there's no data available. This is for elevation layers. For color layers, leave a black color.

Then, select a file to be saved:

Run the warping operation.

Checking warped results

NDunes will reject files that are not in WGS84. For this it'll do some consistenty check when opening files. For ASC files, it'll look at the header, and make sure that coordinates are GPS coordinates. Below an example of a Lambert 93 ASC file that has not been warped (ASC files are text files):

Header values that are not WGS84 (xllcorner and yllcorner represent longitude and latitude in degrees, so somewhere between -180 / +180. This isn't the case)

Similarly, with color layers, NDunes will expect for a XXX file a XXX.aux.xml file that must contain a "GeoTransform" XML tag containing GPS coordinates.