Introduction to GDAL

This tutorial will introduce you to the GDAL command line tools.

3. Reprojecting GIS data

3.1. Reproject raster data

GDAL has the capability to change a raster coordinate system using the following syntax:

gdalwarp -t_srs EPSG:... <input> <output>

The -t_srs argument specifies the target coordinate system. If the source coordinate system is unknown it must be specified with the -s_srs argument. EPSG:... specifies the EPSG code of the projection. <input> and <output> are the input and output data respectively.

We are now going to reproject a Digital Elevation Model (DEM) acquired by the Shuttle Radar Topography Mission (SRTM). You can use this website to download DEM's for your area of interest:

In order to reproject the DEM from WGS-84 lat/lon to Amersfoort/RD New we use this command:

gdalwarp -t_srs EPSG:XXXXX srtm_37_02.tif dem_rd.tif

1. Replace XXXXXwith the proper EPSG code for Amersfoort/RD New (see one of your previous answers using ogrinfo).

2. Execute the command:

gdalwarp -t_srs EPSG:28992 srtm_37_02.tif dem_rd.tif <ENTER>

3. Visualize the result in QGIS.

More info on the gdalwarp command can be found here.