Unit 15 - Data reprojection

In this unit EU-DEM global dataset provided by Copernicus programme will be used. Jena region is covered by tile E40N30. Be aware that EU-DEM tiles covers large regions (4GB per tile).

Normally r.import could be used to import and automatically reproject data into target location. In our case there is no need to import into GRASS a whole big DEM tile. By using -r flag of r.in.gdal GRASS module only a subregion covering AOI can be imported. Unfortunately r.import do not offer such flag. This is a reason why data will be reprojected manually. Input data will be imported into a new location (ETRS89-extended / LAEA Europe EPSG:3035). In the next step imported data will be reprojected into target jena-region (WGS 84 / UTM zone 32N EPSG:32632).


In order to save disk space the original EU-DEM tile was clipped by larger region than Jena AOI. Modified tile is available from geodata/eu-dem directory.

Create location for data import

EU-DEM dataset is provided in ETRS89-extended / LAEA Europe (EPSG:3035). Start a new GRASS session and create a new location jena-eu-dem based on input geodata/eu-dem/dem_sample.tif file as described in Unit 02) or from EPSG code.


Skip data import provided by location wizard since only subregion defined by Jena city region is planned to be imported.

Enter new location (PERMANENT mapset) and copy (ie. reproject) jena_boundary into the current location.


Fig. 87 Copy jena_boundary vector map from jena-region location (EPSG:32632) to the current location (EPSG:3035).


Fig. 88 Reprojection and default maximum segment must be confirmed.


The same operation can be done by v.proj:

v.proj location=jena-region mapset=PERMANENT input=jena_boundary

Before importing DEM set computation region extent based on reprojected Jena city region.


Fig. 89 Set computational region extent based on Jena city region.

Launch r.in.gdal (File ‣ Import raster data ‣ Import of common raster formats) to import DEM tile, don’t forget to enable -r flag.

r.in.gdal -r input=/home/user/geodata/eu-dem/dem_sample.tif output=dem

Fig. 90 Imported DEM limited to current region extent. Visualized using elevation color table.

Reproject DEM into target location

Now switch back to jena-region (target) location (PERMANENT mapset).


Fig. 91 Switch to jena-region location and PERMANENT mapset from Data tab.

Reproject DEM from jena-eu-dem location by copying in Data tab. Set desired resolution (25m) and choose appropriate resampling method (in our case bilinear).


If a mask is enabled, it’s good idea to remove it before importing.


Fig. 92 Reproject raster data by specifying target resolution and resampling method.


The same operation can be done by r.proj:

r.proj location=jena-eu-dem mapset=PERMANENT input=dem method=bilinear resolution=25

Fig. 93 Imported DEM in 3D view. Jena city region by blue color.