Wikipedia:Graphics Lab/Resources/QGIS/Get ready

File:QGis_Print_composer_output_-_06_localizator_starting_point_(correct).png

File:Washington_topographic_map-fr.svg's roads and urban areas, ➍. NASA based shaded relief (+GIMP).
➎. Legends, icons, scale, north arrow, localizator, topographic legend are easily drag&drop added using Inkscape.]]

File:Chinese plain 5c. BC-en.svg

QGis (full name: Quantum GIS) is a GPL license, cross-platform (Windows, Linux, Mac), and rather friendly cartographic software application. It is a Geographic Information System (GIS) program you can use to create, view, and analyze maps. In a nutshell, a GIS associates with each geographic coordinate (dot) on Earth a specific value from some survey. The best example of this is altitude: a topographic map, like the ones you see on the right, can be created from a GIS file in which each pixel represents not only a geographic coordinate, but also information about its altitude. Reversely, objects can be placed on a map and associated with specific coordinates; this is commonly used for features such as roads, bodies of water, state or province borders, urban areas, etc. As a result, these features are georeferenced on separate layers and their shape and location match their actual appearance on the surface of the Earth.

This approach radically changes the process of making maps. Formerly, the mapmaker or graphist had to personally draw each layer of a map, then combine them into an image. The work's reliability and precision were limited by the user's resources and knowledge. Now, the mapmaker can collect precise GIS data from reliable sources and simply load them into QGis. Objects will be automatically placed in their exact coordinates, allowing the user to apply custom styles and output an accurate basemap, which may be the end product, or a background to host additional custom layers (icons, labels, a legend, etc.). For Wikipedia, the advantages of GIS maps are precision, reliability, consistency, and an upgrade in visual elegance of the final images. Using QGis will be mainly helpful in generating topographic backgrounds (png, svg), shaded reliefs (png), and administrative regions or borders (png, svg), and applying various styles to them.

While GRASS GIS still seems to be the most common GIS software, it has a primarily command-line interface and can be difficult to learn and operate. Therefore, beginners will prefer QGis, which is quite powerful and user-friendly. It integrates GRASS GIS and GDAL, provides an easier to use interface for GRASS GIS, and gives the user an opportunity to improve his or her GIS mapmaking skills.

This tutorial series will teach you how to use QGis to generate reliable maps for Wikipedia. Accordingly, it is Wikipedia-centered and focuses on outputting general public encyclopedic maps while following the Wikipedia map conventions.

If you would like a more comprehensive overview of QGis and its functions, you can read the [http://qgis.org/en/documentation/manuals.html official User Guide], available in several languages.

=Step 0.1: Get the tools=

Install QGis

Find your operating system from the list below and follow the link to the appropriate installer. Please don't install the sample data sets (North Carolina, etc.); you will be downloading more complete data later.

  • [http://www.qgis.org/wiki/Download#Windows Windows] (Standalone Installer) ([http://www.qgis.org/wiki/DownloadFr fr], [http://www.qgis.org/wiki/DownloadDe de]) – You can also watch a video demonstrating the installation process [http://vimeo.com/9476971], but be advised that it is out of date and describes currently inaccurate file sizes and download times.
  • [http://www.qgis.org/wiki/Download#Linux Linux] ([http://www.qgis.org/wiki/DownloadFr#Linux fr], [http://www.qgis.org/wiki/DownloadDe#Linux de]), for Ubuntu:

::sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable #For versions >1.7.0

::sudo apt-get update

::sudo apt-get install qgis

  • [http://www.qgis.org/wiki/Download#MacOS_X MacOS X] (FrameWorks) ([http://www.qgis.org/wiki/DownloadFr#MacOS_X fr], [http://www.qgis.org/wiki/DownloadDe#MacOS_X de])

While QGis will allow you to open many GIS files, we are mainly concerned with .tiff (raster) and .shp (vector) files.

{{important|If you encounter any issues, you can browse and ask questions at the [http://forum.qgis.org QGis Forum] ({{green|no more active}}), or another forum.}}

Create some helpful folders

On your desktop, or some other suitable place, create the following folders:

class="wikitable"
style="width: 30%; vertical-align: top; padding: 1em;" |

→ QGis

:→ Data_ETOPO1

:→ Data_SRTM

::→ Shaded

:→ Data_Naturalearth.com

:→ (Data_... [other source folders as needed])

:→ Tutorials

:→ Mapcolors

:→ Projects

:→ Examples

:→ Outputs

:→ [others as needed]

| style="vertical-align: top; padding: 1em; padding-left: 2em;" |

  • You need separate Data_[sourcename] folders because data sets from each source may have different copyright status, coverage quality, or subjects (topography, political boundaries, etc.), and are usually made of dozens of files/tiles. Separate folders for each source will help you keep the files together and the sets organized.
  • Tutorials will host any interesting tutorials (webpages, PDF, etc.) you may find, which you can then edit or take notes on.
  • Any color styles you will find online or create yourself can be saved into Mapcolors.
  • Your QGis projects will be saved in the Projects folder.
  • Examples lets you collect any maps on Wikipedia that you like and want to study (reverse engineering).
  • Outputs will host the many intermediate outputs you will generate and look at to improve your mapmaking skills, as well as any finished maps you create.

=Step 0.2: Download the GIS data=

{{See also|Wikipedia:Graphic_Lab/Resources/Gis_sources_and_palettes{{!}}/GIS sources & palettes (English)||:fr:Aide:Cartographie/Ressources cartographiques géoréférencées#Sources des données{{!}}French|:de:Hilfe:GMT#Topographische_Datens.C3.A4tze{{!}}German}}

:{{done}}— section updated (2012/02)

There are 2 kinds of data: raster GIS files — surfaces with limited precision represented by dots (pixels) — most of time topographic data; and vector GIS files — dots, lines and polygons. Below are both the biggest families, and some links to download the files needed for this tutorial.

=Topography/bathymetry=

file:QGis_ETOPO1_vs_SRTM3_-_quality_match.jpeg

  • {{GIS data for Graphic Lab |name=ETOPO1 |url_download=http://www.ngdc.noaa.gov/mgg/global/global.html |publisher=NGDC-NOAA |year=2009 |license= Public domain |tag= standard |url_doc=http://www.ngdc.noaa.gov/mgg/global/etopo1sources.html |layers=topography & bathymetry |precision_max=1850m (1minute arch) |covered_area= all Earth (90N-90S, landmass & sea floor) |datum=WGS 84 |projection = (?) |extensions=.zip → .tif and others |size_compressed=326Mo |size_uncompressed=900Mo |tile_size=whole earth |tiles_total= 1 |comment = Perfect for very large maps (ex: > France).|editor_note= For this tutorial, download: [http://www.ngdc.noaa.gov/mgg/global/relief/ETOPO1/data/ice_surface/grid_registered/georeferenced_tiff/ ETOPO1 Ice Surface (grid registered)] or [http://www.ngdc.noaa.gov/mgg/global/relief/ETOPO1/data/bedrock/grid_registered/georeferenced_tiff/ ETOPO1 Bedrock (grid-registered)]. nb: ETOPO1 (1px=1km²) is a better data than ETOPO2 (1px=2kmx2km).}}
  • {{GIS data for Graphic Lab |name= SRTM3 (90m) |url_download= http://demex.cr.usgs.gov/DEMEX/ |publisher= NASA / USGS |year= 2000 |license= Public Domain |tag= standard |url_doc= http://dds.cr.usgs.gov/srtm/version2_1/Documentation/SRTM_Topo.pdf |layers= topography |precision_max= 93m (3"arch) |covered_area= 60⁰N-56⁰S (landmass only) |datum= WGS 84 |extensions= .tif |size_compressed= |size_uncompressed= |tile_size= on command |tiles_total= 1 |comment = Perfect for small areas anywhere in the world. Need to create a free account. Worth it. You will use this source frequently. |editor_note= For this tutorial, and since GIS data are quite heavy (SRTM3 90m, Aster 30m), select and download the smallest area possible (Taiwan, Hongkong are good choices with both sea and mountains).}}

{{Collapse|title=Depreciated 'tiles download' approach|1=

Formerly, high precision topographic GIS datas being too big —about 60GB for the whole Earth—, these datas were split into dozens, hundreds, or thousands small tiles about some MB each. The mapmaker had to find, download, unzip, load the several needed tiles (say 10 tiles for Danemark), and manage these 10 tiles in parallel for color styles, effects, etc. However, the process is a more complex than downloading a single file. You will need to:

  1. Know the coordinates of the area you want to map—although you do have the option of visually selecting the area on the download page.
  2. Find the associated GIS files (also called tiles). SRTM files have names such as "N22E112.hgt.zip", standing for 22⁰ North, 112⁰ East.
  3. Download them. A small island will be made of a few files, the Korean peninsula of about a hundred, and Eurasia of more than 5,000.
  4. Unzip them.
  5. Load them into QGis.

}}

=Other GIS data=

;Provinces:

  • {{GIS data for Graphic Lab |name= Admin level 1 : State/Provinces polygons (10m-admin-1-states-provinces) |url_download=http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/10m-admin-1-states-provinces-shp.zip |publisher=[http://www.naturalearthdata.com/ Naturalearthdata.com] |year= 2009 |license=Public domain |tag= standard

|url_doc=http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-states-provinces/ |layers=major rivers lines |precision_max= |covered_area=whole earth |datum=WSG84 |projection =Geographic projection(?) |extensions=.zip →.shp |size_compressed=14Mb |size_uncompressed=19Mb |tile_size=whole Earth |tiles_total=1 |comment = For location maps, large and local, and complex maps (political, military, history).|editor_note= }}

;Others existing

There are vatious other GIS layers available online. By example, [http://www.naturalearthdata.com/features/ Naturalearthdata.com] (public domain) is a collection of easily usable GIS data with the following categories:

  • cultural—human and administrative (areas or borders) for countries (L-0) and smaller administrative divisions (L-1, L-2, L-3), as well as cities and urban areas
  • physical—coastlines, rivers, lakes, bathymetry, and geographic lines
  • raster backgrounds—Natural Earth 2 (topographic), ocean bottom, shaded relief grey

To see our selection, go to the /Gis_sources_and_palettes subpage.

=Step 0.3: Load a GIS file as a layer=

Image:QGis tutorial - layers toolbar.png

Loading a GIS file adds the data into your project as a layer. For our purposes, we care about vector layers and raster layers. There are three ways you can add layers into your project: using the menu, using the keyboard shortcuts, or using the toolbar icons.

  • Using the menu: go to Layer > Add Vector Layer... or Layer > Add Raster Layer..., depending on which you would like to add, and Layer > Remove Layer(s) to delete.
  • Using the shortcuts: Ctrl + Shift + V (Cmd + Shift + V on Mac) to add a vector layer or Ctrl + Shift + R (Cmd + Shift + R) to add a raster layer, and Ctrl + D (Cmd + D) to remove layer(s).
  • Using the toolbar: Simply click the icon corresponding to the layer type you want to add.

You can also remove a layer by selecting it in the Layers window, right clicking on it, and clicking on Remove.

Since the ETOPO1 data is a raster file, go ahead and add it to your project using whichever Add Raster Layer method you prefer.

file:QGis_Data_load_-_01_raster_topography.png |1. Adding a raster layer.

file:QGis_Data_load_-_02_raster_topography.png |2. Topographical data will appear in grey.

=Links=

{{Digital cartography tutorials}}

ru:Википедия:Проект:Картография/Помощь/Векторная физическая карта

fr:Wikipédia:Atelier_graphique/Didacticiels_cartographiques/Didacticiel_de_création_de_carte_avec_QGIS