jeudi 9 septembre 2010

Importer le MNT de l'IGN avec QGIS & GRASS

Ici, nous allons voir comment importer le Modèle Numérique de Terrain de l'IGN dans QGIS/GRASS et comment visualiser le résultat dans le visionneur 3D NVIZ

jeudi 2 septembre 2010

[GRASS] Aerial Image + Shaded Relief => Shaded Aerial Image

Sometimes, one might find the relief feeling given by an aerial image a little poor. You could also find that the moment the photo was taken doesn't enhance the right elements of the relief.



One solution is to use a raster elevation to integrate a shaded relief to an aerial image.

Used modules

Prerequisites
This assumes that you already have in your mapset:
  • the aerial image: ortho
  • the elevation raster map: MNT. This article explains you how to import MNT (for french readers)
And that your GRASS region is positioned on your area of interest:

g.region rast=ortho

Creating the shaded relief

r.shaded.relief map=MNT shadedmap=MNT.shaded altitude=80 azimuth=60 zmult=1 scale=1



Combining the aerial image with the shaded relief
Here, we use the aerial image and use the intensity of the shaded relief so as to get a modified aerial image.

r.his h_map=ortho i_map=MNT.shaded g_map=ortho.shaded.green b_map=ortho.shaded.blue r_map=ortho.shaded.red

The areas of the aerial image covered by dark areas of shaded relief will get darker but those covered by white areas will remain closely the same.
That's why the choice of altitude is important during the r.shaded.relief step. Using a low altitude parameter will cause the horizontal areas of the final image to be dark. We chose a value close to 90 (mid-day time), so as to enhance the horizontal areas.

Combining the different color raster maps of the shaded aerial image
As the shaded relief aerial image has been generated in 3 different rasters maps, we have to merge them.

r.composite green=ortho.shaded.green blue=ortho.shaded.blue red=ortho.shaded.red out=ortho.shaded

Here's the result:

Here, the feeling of relief that has been added is very light. Play around the azimuth and altitude parameters to get the appropriate aspect for your map.

Note: All the operations have been performed from QGIS, sometimes from the GRASS QGIS Shell. If you use GRASS and not QGIS, this operation is unnecessary. When displaying the aerial image under GRASS, just choose "Drape Map". However, you may find an interest in applying this method under GRASS if you want to output the result...