Wikipedia:Graphics Lab/Resources/QGIS/Create a topographic background: Difference between revisions
Content deleted Content added
moved Wikipedia:Graphic Lab/Resources/QGis lesson 1: Create a topographic background to Wikipedia:Graphic Lab/Resources/QGis lesson 0: Get ready: better |
No edit summary |
||
Line 1:
You already have a GIS file loaded in QGIS, we will now apply to it some nice colors, then output a PNG background for our area of interest and final map.
#REDIRECT [[Wikipedia:Graphic Lab/Resources/QGis lesson 0: Get ready]]▼
=Step 4: Add some custom colors=
▲
The topographic GIS data you downloaded is by default displayed using a monochromatic palette (mapcolors) going from white to black; however, you have the option of using other colors. You can either load an existing mapcolor file, edit an existing mapcolor file or create your own mapcolors. To do this, you will need to edit the layer's properties.
Please note that per the Wikipedia [[Wikipedia:WikiProject Maps/Conventions| map conventions]], you should use the colors provided for all topographical shading.
==Loading mapcolors==
For this, you will be using the '''Wikicarto_2.0.qml''' file you created earlier in this tutorial.
# Right click on the layer name in the ''Layers'' window and select ''Properties''. The ''Layer Properties'' window will pop up.
# Under the ''Symbology'' tab, click ''Load Style ...'' at the bottom of the window.
# Find and select '''Wikicarto_2.0.qml''', then hit ''Open''.
# Click ''OK''. Your map should now be in color!
<gallery widths="500px" heights="300px">
File:QGis_Load_mapcolor_style_-_01_properties_window.png | The default layer properties window.
File:QGis Print composer output - 06 localizator starting point (correct).png | The final result.
</gallery>
==Editing mapcolors==
[[File:QGis_Load_mapcolor_style_-_02_mapcolor_box.png|thumb|400px|The ''Colormap'' tab with colors already loaded.]]
If you would like to edit already loaded mapcolors, simply go to the ''Colormap'' tab. There, you can add or delete entries by selecting them and clicking the appropriate buttons. You can also edit the ''Value'', ''Color'', and ''Label'' fields of any entry by simply double clicking on the field you wish to change. Click ''Apply'' to see the changes.
==Creating mapcolors==
If you would like to create your own colors from scratch—this is advised against for topographical maps, which should follow the [[Wikipedia:WikiProject Maps/Conventions| map conventions]]—you can do so by following these steps on a layer which has not had colors loaded onto it:
# Access the ''Layer Properties''.
# Under the ''Symbology'' tab, change ''Single band properties > Color map'' from ''Grayscale'' to ''Colormap''. This will enable the options in the ''Colormap'' tab.
# In the ''Colormap'' tab, use the ''Add entry'' button to add colors. They will all have default values.
# Double click on the ''Value'', ''Color'', or ''Label'' fields of the entries to change them. For topography, the ''Value'' will be the altitude (ex.: 100 for 100m, 250 for 250m, and so on).
# ''Apply'' or ''OK'' to see the changes.
==Saving mapcolors==
You can save edited or created mapcolors as a style file by clicking ''Save Style...'' at the bottom of the ''Layer Properties'' window. This will allow you to apply those mapcolors to another map. If you would like to make colors—whether loaded or created—the default colors for the map, click ''Save As Default''. This will allow you to keep editing or loading different colors while having the option to ''Restore Default Style'' if you don't like the changes you've made.
==Existing color palettes==
The [[Wikipedia:Graphic Lab/Resources/QGis mapcolor files|QGis mapcolor files]] page already has some palettes you can use. Simply copy-paste the code into a text document, then save as PALETTENAME'''.qml''' and follow the steps above to load it into your map.
=Step 5: Output your map, ''aka'' using the Print composer=
{{summarization|title=This section is to redo (update/upgrade)|1=
[[file:QGis Print composer output - 11 bitmap (png).png|right|300px|thumb|What we want is this: a high quality topographic output. With QGis and experience, you can get this in about 5 to 10 minutes.]]
You are now working with QGis, your GIS data—namely, ETOPO1—and your customized palette. To output your first topographic background, '''don't use ''File > Save as Image'', which is a simple screenshot.''' For better quality, use the ''Print composer''. This step will walk you through outputting a map like the one you see on the right, including a grid and an inset that lets the viewer know where in the world this section is located.
;Background
# To give a smooth, gradient-like appearance to the colors, go to ''Layer > Properties > Colormap > Color interpolation'' (at the top), and set it to ''Linear''.
# By default, the canvas of QGIS (geographic area visible in QGis) will become the area of interest for print composer.
# Open the ''Print composer'': ''QGIS (1.7)> File > New Print Composer (Ctrl + P)''.
==Placing the main section for output==
In the print composer:
# On the right, under ''General'', you can change the ''Size'' and ''Orientation'' of the image you will be outputting. A larger paper size and [[dots per inch|dpi]] means a higher quality, but don't go overboard! You don't want to end up with a huge file size that takes forever to upload and download.
# To add your map, you can either go to ''Layout > Add Map'' or click the ''Add new map'' icon in the toolbar.
# Click and drag in a diagonal motion across the white area to place your map. You can move it around and resize it once it's placed.
==Adding a grid==
# Make sure the placed map is selected—you will see four squares in the corners of the image when it is.
# On the right, go to the ''Item'' tab.
# Click on ''Grid'' and check the ''Show grid?'' option.
# Increase the ''Interval X'' and ''Interval Y'' fields. You can play around with the ''Offset X'' and ''Offset Y'' options, as well as the ''Grid type'' and ''Line color'', until you get a grid you like. You can also turn on and change options for the border annotations.
==Adding a localizer inset==
{{in progress}}
# step
# step
# step
Go to ''File > Export as Image'' or ''PDF'' or ''SVG'' (warning, SVG export is somewhat dodgy) and you have yourself a high quality topographic background!
}}
==Visual step-by-step==
{{in progress}}
<gallery widths="600px" heights="300px" align="center">
file:QGis Print composer output - 00 starting point.png|0. Starting point (QGIS, not Print composer): Data are ready an using the correct colormap.
file:QGis Print composer output - 01 map size.png|01. File > New Print composer (Ctrl+P) > (you have a white page) > icon 'Add new map' > draw the diagonal of the area for your map
file:QGis Print composer output - 02 page size.png|02. Choice the page size (mm) and quality (dpi) : higher means better quality.
file:QGis Print composer output - 03 map centering.png|03. Centering the map
file:QGis Print composer output - 04 map Grid tab, show grid.png|04. Grid tab, add grid.
file:QGis Print composer output - 05 map Grid tab, show annotations.png|05. Grid tab, add annotations
file:QGis Print composer output - 06 localizator starting point (WRONG).png|06. Starting point for the localizator BUT white border in the tab : this is troublesome.
file:QGis Print composer output - 06 localizator starting point (correct).png|06. Starting point for the localizator without white in the maptab : Great !
file:QGis Print composer output - 07 localizator added.png|07. icon 'Add new map' > draw the diagonal of the area for your map (same than 01)
file:QGis Print composer output - 08 localizator red frame.png|08. Icon 'Add basic shape' > trace a shape > change to rectangle
file:QGis Print composer output - 09 Final look.png|09. Final look.
file:QGis Print composer output - 10 Final save.png|10. Save as png.
file:QGis Print composer output - 11 bitmap (png).png|11. QGis Print composer's Final high quality output (you can zoom in !)
</gallery>
=Links=
{{Digital cartography tutorials}}
[[ru:Википедия:Проект:Картография/Помощь/Векторная физическая карта]]
[[fr:Wikipédia:Atelier_graphique/Didacticiels_cartographiques/Didacticiel_de_création_de_carte_avec_QGIS]]
|