From Wikipedia, the free encyclopedia
|
 |
This user believes that fuck is the most versatile word in the English language. |
|
Current translation
[edit] Summary
The object of this tutorial is to optimize relief shadows resulting from a digital terrain model (DTM) created using the programs 3DEM or GRASS GIS.
In many cases, a single illumination source is inadequate for showing the main forms of a relief, particularly if it is oriented North-West - South-East in the axis of the main light source. In order to improve the result, it is possible to displace the virtual Sun across the map and create three views which will be assembled together to produce a composite shadow image of the map in question.
This page proposes a second optimisation which could be applied to general maps covering a country. If on a large scale map, such as those resulting from the files of the Shuttle Radar Topography Mission (SRTM), each detail of the relief is useful and clearly visible, this may be of less use in a more general map in which it is rather the principal forms which are of interest.
[edit] The tools
- 3DEM (version used: 20.0): free and easy to use GIS editor with which the relief shadow maps will be created;
or:
- GRASS GIS (version used: winGRASS 6.3.0RC6): free multi platform GIS program; powerful but more delicate to use;
- GIMP (version used: 2.2.13): bitmap editor which will allow optimization of the relief shadows
[edit] Potential data sources
These are bitmap files released into the public domain, compressed into zip (file format) format, which contain the digital topographic data of a given region. The zone covered by the DEMs resulting from the SRTM runs from latitude 56° South to latitude 60° North. These files must be decompressed before being used in 3DEM.
There are three SRTM file types:
-
- SRTM1 (download here): the most precise data with a resolution of one arcsecond (31 m at the equator), but which are only available for the United States and its dependencies. Each file represents a rectangle of a degree of an arc to a side referenced according to the coordinates of the bottom left corner.[1].
-
- SRTM3 (download here): a precision of three arcseconds (93 m at the equator) which covers all emerged land between the latitudes indicated above. Filetypes and references identical to SRTM1. These are the datasets which will be of most use for the needs of Wikipedia.
-
- SRTM30 (download here): a precision of 30 arcseconds (926 m at the equator), adapted for maps covering more than one country or a continent.
- Each map covers a region of 50° of latitude by 40° of longitude, referenced according to the coordinates of the upper left corner. Each map is contained in a specific folder which contains 12 separate files. Only 10 of these will be of use to us; the remaining files *.jpg.zip and *.gif.zip are only preview files. These 10 files must each be downloaded and decompressed before being used in 3DEM. In the program, select the GTOPO30 Tile option, then in the new window representing the map of the world, centre the frame on the region of interest and specify Lat/Lon as the projection type. Navigate through the tree and select the .DEM file.
[edit] Creation of shaded relief images
[edit] With GRASS GIS
- 1. Open GRASS and enter into the following project a UTM projection. Launch the module r.shaded.relief (Raster -> Terrain analysis -> Shaded relief).

- 2. In the module window, click on the button of the Input elevation map: field and select the DEM map which has previously been imported into GRASS. By default, GRASS uses an illumination coming from the West (270° - from the left), but in cartography the norm has illumination coming from the North-West (upper left corner). This illumination, impossible in reality for the northern hemisphere, has become a convention and avoids in particular the optical illusion of a relief inversion in which one has the impression of seeing valleys as mountains and vice versa. In the field Output shaded relief map name:, enter a name for the first shaded relief map which will be created; for example, Shadows_315. In the field Altitude of the sun..., specify a value of around 60°. For the azimuth, enter 315 and leave the factor for exaggerating relief field at 1, unless the terrain is particularly flat which will result in low visibility shadows. Click on the Run button to start the operation which is detailed in the Output - GIS.m window.

- 3. When the operation has been completed (indicated by the phrase "Shaded relief map created and named <Shadows_315>."), you can preview these shadows to check whether the aspect is correct (the height of the Sun and thus the luminosity of the map, the factor of exaggeration of relief, etc). In the GRASS manager window, create a bitmap layer then click on the Base map button and select the file Shadows_315. In the Map Display 1 window, click on the Display active layers button to display the map.
- 4. In the r.shaded.relief module window, change the azimuth to 275°. Change the output filename to Shadows_275, then click on the Run button. Repeat the operation for an illumination from 355°. Close the module.
- 5. Export the first shaded relief map in PNG format: File -> Export raster map -> PNG. In the r.out.pngmodule window, select the file Shadows_315. In the field Name for new PNG file:, replace <rasterfilename> with Shadows_315, then click on the Run button. The file is saved by default in the C:\GRASS directory.
- 6. Modify the output filenames for the other two shaded relief maps. Exit GRASS.
[edit] With 3DEM
- 1. Open 3DEM. Click on File -> Load Terrain Model (1). Select the SRTM Data option (2) then in the new window files of type .hgt.
- 2. As the DEM has empty pixels[2], they must be patched: press F7 and select the whole map with the mouse (1). Confirm the selection by pressing Enter. 3DEM fills in these pixels by interpolating values from adjacent pixels. (2)
- 3. Change the projection: Operation -> Change Projection -> Convert to UTM Projection (1). Select the WGS84 option (2) which is the norm used by the SRTM files. Click OK. The map is redrawn and the meridians, which were previously parallel, now converge towards the poles.
- Note: The following screen captures show the map with the colours recommended by the Wikipedia colouring convention, but changing the colours is not a required step in this tutorial.
|
|
|
| Changing the projection |
The map showing a UTM projection |
- 4. If, after confirming, a message appears indicating that the map is too large and that a smaller area must be chosen, this means that your map covers more than one UTM zone; an operation that 3DEM is currently not capable of displaying. In such cases it is necessary to redimension the map: press F8 and select a smaller area with the mouse over the whole height of the map, then confirm by pressing ENTER. Continue with the modification of the projection as indicated in point 3. This action must be repeated for the other part of the map, which requires reloading the relevant DEMs into 3DEM and repeating the operation from point 1.
- 5. Resize the map: press F6 and move the cursor until the required values for height and width are achieved.
- 6. Exporter un aperçu de la carte : vérifier que le quadrillage des coordonnées soit affiché (Geo Coordinates -> Lat-Lon Grid On) (1), aller dans File -> Save Map Image (2) et sélectionner le format jpeg (3), valider et indiquer un nom pour l'image. Enregistrer. Cette carte compressée au format .jpg n'est destinée qu'à servir de référence grâce aux coordonnées pour faciliter les transformations nécessaires sur la carte finale (rotation, alignement des calques, etc.). Supprimer l'affichage du quadrillage des coordonnées (Geo Coordinates -> Lat-Lon Grid Off).
- 7. Appuyer sur F3 et modifier l'échelle colorimétrique du terrain en spécifiant pour chaque tranche d'altitude une couleur blanche afin de supprimer les informations topographiques.
- 8. Les MNT de la SRTM ayant un tracé des côtes imprécis[3], nous allons forcer 3DEM à considérer qu'il n'y a pas d'océan pour éviter des « escaliers » dans le dégradé au niveau de ces zones par rapport au tracé issu des SRTM Water Body Data (SWBD). Dans la section Terrain Type (toujours dans la fenêtre Terrain colors, F3), sélectionner l'option Mountain/Plain : 3DEM appliquera sur toutes les surfaces aquatiques une couleur grise correspondant à la couleur d'une plaine plate sans ombres. Cette méthode est empirique mais adaptée aux besoins dans Wikipédia car rendant pratiquement invisibles ces défauts. Valider.
|
|
|
| Détail d'un relief montrant des zones dans le SRTM considérées comme étant des surfaces aquatiques (cerclées de rouge). Ici, la mer dans 3DEM avait une couleur blanche ; le trait de côte et la mer bleue proviennent d'une carte SWBD affichée pour comparaison ; les zones blanches cerclées de vert sont des flancs de montagnes à l'illumination saturée (n'est pas un défaut). |
Sélection de l'option Mountail/Plain |
- 9. Modifier l'illumination de la carte : par défaut, 3DEM utilise un éclairage venant du Sud-Ouest (240° - coin inférieur gauche) qui est naturel, mais en cartographie la norme veut que l'illumination vienne du Nord-Ouest (coin supérieur gauche). Cet éclairage, impossible dans la réalité pour l'hémisphère Nord, est devenu une convention et évite en particulier l'illusion d'optique d'inversion du relief pour laquelle on a l'impression de voir des vallées comme des montagnes et inversement. Cliquer sur Color Scale -> Shaded Relief et modifier le champ Deg Azimuth pour 315. Valider.
- 10. Aller dans File -> Save Map Image, sélectionner le format bmp pour une qualité optimale, et sauvegarder cette image, par exemple sous le nom Ombres_315.
- 11. Aller à nouveau dans Color Scale -> Shaded Relief et spécifier cette fois dans le champ Deg Azimuth une valeur de 275. Valider puis enregistrer cette image au format BMP sous le nom Ombres_275.
- 12. Modifier une nouvelle fois la position de l'illumination en indiquant 355. Sauvegarder cette troisième image sous Ombres_355. Fermer 3DEM.
[edit] Mise en valeur des formes du relief
- 1. Ouvrir l'image Ombres_315.png (ou .bmp) dans GIMP. Dupliquer ce calque et lui appliquer un mode de fusion < Multiplier > pour renforcer la densité des ombres suivant cet éclairage principal.
- 2. Ouvrir en tant que calque (CTL + ALT + O) l'image Ombres_275, modifier sa fusion pour < Multiplier > (dans le menu déroulant mode de la fenêtre calques, canaux, chemins) et lui ajouter un masque noir (calques > masque > ajouter un masque de calque).
- 3. Agrandir l'affichage vers 200 % (affichage > zoom > 200 %). Sélectionner l'outil Pinceau flou d'une taille d'environ 7 pixels et peindre le masque en blanc au niveau des ombres des formes principales du relief orienté sensiblement Nord-Sud afin de rehausser ces lignes.
|
|
|
| Rehausser les lignes Nord-Sud du relief |
Aspect du masque du calque < Ombres 275 > |
- 4. Répéter les opérations des points 2 et 3 pour l'image Ombres_355 afin de rehausser les lignes Est-Ouest. Prendre garde de ne pas renforcer les ombres sur les flancs opposés d'une même montagne.
- 5. Enregistrer l'image au format .xcf pour préserver les calques s'il est nécessaire d'effectuer des modifications par la suite. Exporter l'image au format .png afin de pouvoir l'utiliser en tant que calque au dessus de votre carte (consulter le didacticiel spécifique s'appliquant à votre type de carte pour cette opération). Renforcer éventuellement le contraste grâce à l'outil Courbes (CTL + M) – ne pas utiliser l'outil Luminosité-Contraste… qui ne permet pas un contrôle précis de l'opération.
- Remarque : Une solution plus simple et rapide est d'additionner les calques avec une fusion Multiplier sans leur ajouter de masque noir, mais cette méthode n'est pas très efficace pour mettre en valeur les formes du relief.
[edit] Pour en savoir plus
- (English) Reliefshading.com : site présentant les règles graphiques en cartographie et qui traite de la question des ombres du relief.
[edit] Réduction du niveau de détail du relief ombré
Note : Cette optimisation s'applique aux cartes à petite échelle couvrant une large zone terrestre et montagneuse pour laquelle l'excès de détails perturbe la lecture des formes générales du relief.
- 1. Ouvrir dans GIMP l'image png du relief ombré optimisé créée précédemment. Noter ses dimensions en pixels. Aller dans Image -> Échelle et taille de l'image…. Spécifier un redimensionnement en < pourcent > et indiquer une valeur de 20 %. Cliquer sur le bouton Échelle pour valider.
- 2. Ouvrir à nouveau la fenêtre de redimensionnement de l'image et indiquer une valeur de < 500 % > (vérifier que la dimension en pixels indiquée correspond bien à la taille de l'image originale). Ces opérations ont pour effet de diminuer les détails et de rendre peu visibles les petites vallées. Enregistrer l'image sous un nom différent de l'image source. Fermer le document.
|
|
|
| Redimensionnement à la taille originale |
Aspect de la carte après l'opération |
- 3. Ouvrir l'image originale des ombres détaillées. Ouvrir en tant que calque (CTL + ALT + O) la carte modifiée qui vient d'être créée au point 2 et lui appliquer une transparence d'environ 50 %, le but étant d'obtenir une image des ombres qui ne paraisse pas floue mais dont les plus petits détails seront très peu visibles sur la carte finale afin de mettre en valeur les lignes générales du relief. Renforcer éventuellement le contraste grâce à l'outil Courbes (CTL + M).
|
|
|
| Fusion des deux calques |
Comparaison carte originale / carte optimisée |
[edit] Pour en savoir plus
- (English) Shadedrelief.com : didacticiel entrant davantage dans les détails sur cette technique.
Template:Wikipédia:Atelier graphique/Didacticiels cartographiques/Didacticiels pour la cartographie numérique géoréférencée
- ^ Example: the file N48E001.hgt.zip, (decompressed: N48E001.hgt), covers the zone between the 48° and 49° North and 001° and 002° East.
- ^ A problem with SRTM files is that, in spite of the fact that practically all emerged zones have had at least two overflights, certain zones have remained blind to the oblique rays of the radar due to the exaggerated form of the relief.
- ^ Un des défauts des fichiers SRTM est leur manque de précision au niveau des côtes, en particulier en raison des vagues qui faussent les données du radar embarqué. Les fichiers SWBD fournis par la NASA sont destinés à pallier ce défaut.
Optimisation des ombres du relief