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).
Note
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.
Important
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.
Note
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.
Launch r.in.gdal ( ) 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
Reproject DEM into target location¶
Now switch back to jena-region (target) location (PERMANENT mapset).
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).
Note
If a mask is enabled, it’s good idea to remove it before importing.
Note
The same operation can be done by r.proj:
r.proj location=jena-eu-dem mapset=PERMANENT input=dem method=bilinear resolution=25