Wikipedia:Graphics Lab/Resources/QGIS/Get ready: Difference between revisions

Content deleted Content added
 
(23 intermediate revisions by 10 users not shown)
Line 1:
[[File:QGis_Print_composer_output_-_06_localizator_starting_point_(correct).png|thumb|300px|The QGis interface. QGis can import GIS data—high quality topographic backgrounds, shaded reliefs, and administrative regions or borders—and apply styles to them.]]
[[File:Washington_topographic_map-fr.svg|300px|thumb|Map with imported GIS data: ➊. NASA's topographic background, shaded➋. relief,NaturalEarth's administrative borders, ➌. [[OpenStreetMap|OSM]]'s roads and urban areas, ➍. TheNASA based shaded relief (+GIMP).<br />➎. labelsLegends, icons, andscale, north arrow, localizator, topographic legend are easily addeddrag&drop lateradded using [[Inkscape]].<!--➊➋➌➍➎➏-->]]
[[File:Chinese plain 5c. BC-en.svg|thumb|300px|right|Made using GIS data 'ETOPO1', QGis, this QGis tutorial, Inkscape, and the Wikipedia map conventions. Late Spring and Autumn Period, 5th centry BCE, before the breakup of Jin and the Qin move into Sichuan.]]
 
Line 17:
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 '''.[[Tagged Image File Format|tiff]]''' (raster) and '''.[[Shapefile|shp]]''' (vector) files.
{{important|If you encounter any issues, you can browse and ask questions at the [http://forum.qgis.org QGis Forum] ({{green|veryno more active}}), willor generallyanother answer in ~6 hours}})forum.}}
 
==Create some helpful folders==
{{work in progress}}
On your desktop, or some other suitable place, create the following folders:
 
Line 57 ⟶ 59:
*Your QGis projects will be saved in the ''Projects'' folder.
 
*''Examples'' let'slets 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=
==Save your first color style==
:{{done}}— section updated (2012/01){{work in progress}}
Copy-paste the following color code in an empty, [[plain text]] document (using something like [[Notepad]] or [[TextEdit]]), then save it in ./QGis/Mapcolors/ as '''Wikicarto_2.0.qml'''. We will frequently use it later.
{{summarization|title=: Colormap "Wikicarto_2.0.qml"|1=<pre>
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="1.6.0-Copiapo" minimumScale="1" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0">
<transparencyLevelInt>255</transparencyLevelInt>
<rasterproperties>
<mDrawingStyle>SingleBandPseudoColor</mDrawingStyle>
<mColorShadingAlgorithm>ColorRampShader</mColorShadingAlgorithm>
<mInvertColor boolean="false"/>
<mRedBandName>Not Set</mRedBandName>
<mGreenBandName>Not Set</mGreenBandName>
<mBlueBandName>Not Set</mBlueBandName>
<mGrayBandName>Bande 1</mGrayBandName>
<mStandardDeviations>0</mStandardDeviations>
<mUserDefinedRGBMinimumMaximum boolean="false"/>
<mRGBMinimumMaximumEstimated boolean="true"/>
<mUserDefinedGrayMinimumMaximum boolean="false"/>
<mGrayMinimumMaximumEstimated boolean="true"/>
<mContrastEnhancementAlgorithm>StretchToMinimumMaximum</mContrastEnhancementAlgorithm>
<contrastEnhancementMinMaxValues>
<minMaxEntry>
<min>-10458</min>
<max>6741</max>
</minMaxEntry>
</contrastEnhancementMinMaxValues>
<mNoDataValue mValidNoDataValue="false">-9999.000000</mNoDataValue>
<customColorRamp>
<colorRampType>DISCRETE</colorRampType>
<colorRampEntry red="245" value="8000.000000" green="244" blue="242" label="altitude 19 neiges eternelles"/>
<colorRampEntry red="224" value="7000.000000" green="222" blue="216" label="altitude 18 neiges eternelles"/>
<colorRampEntry red="202" value="6000.000000" green="195" blue="184" label="altitude 17 neiges eternelles"/>
<colorRampEntry red="186" value="5000.000000" green="174" blue="154" label="altitude 16 neiges eternelles"/>
<colorRampEntry red="172" value="4000.000000" green="154" blue="124" label="altitude 15 neiges eternelles"/>
<colorRampEntry red="170" value="3000.000000" green="135" blue="83" label="altitude 14"/>
<colorRampEntry red="185" value="2000.000000" green="152" blue="90" label="altitude 13"/>
<colorRampEntry red="195" value="1500.000000" green="167" blue="107" label="altitude 12"/>
<colorRampEntry red="202" value="1000.000000" green="185" blue="130" label="altitude 11"/>
<colorRampEntry red="211" value="800.000000" green="202" blue="157" label="altitude 10"/>
<colorRampEntry red="222" value="600.000000" green="214" blue="163" label="altitude 9"/>
<colorRampEntry red="232" value="400.000000" green="225" blue="182" label="altitude 8"/>
<colorRampEntry red="239" value="300.000000" green="235" blue="192" label="altitude 7"/>
<colorRampEntry red="225" value="200.000000" green="228" blue="181" label="altitude 6"/>
<colorRampEntry red="209" value="150.000000" green="215" blue="171" label="altitude 5"/>
<colorRampEntry red="189" value="100.000000" green="204" blue="150" label="altitude 4"/>
<colorRampEntry red="168" value="50.000000" green="198" blue="143" label="altitude 3"/>
<colorRampEntry red="148" value="20.000000" green="191" blue="139" label="altitude 2"/>
<colorRampEntry red="172" value="1.000000" green="208" blue="165" label="altitude 1"/>
<!-- <colorRampEntry red="167" value="0.000000" green="223" blue="210" label="depression"/> -->
<colorRampEntry red="216" value="0.000000" green="242" blue="254" label="altitude -1"/>
<colorRampEntry red="198" value="-20.000000" green="236" blue="255" label="altitude -2"/>
<colorRampEntry red="185" value="-50.000000" green="227" blue="255" label="altitude -3"/>
<colorRampEntry red="172" value="-100.000000" green="219" blue="251" label="altitude -4"/>
<colorRampEntry red="161" value="-250.000000" green="210" blue="247" label="altitude -5"/>
<colorRampEntry red="150" value="-500.000000" green="201" blue="240" label="altitude -6"/>
<colorRampEntry red="141" value="-750.000000" green="193" blue="234" label="altitude -7"/>
<colorRampEntry red="132" value="-1000.000000" green="185" blue="227" label="altitude -8"/>
<colorRampEntry red="121" value="-2000.000000" green="178" blue="222" label="altitude -9"/>
<colorRampEntry red="113" value="-4000.000000" green="171" blue="216" label="altitude -10"/>
</customColorRamp>
</rasterproperties>
</qgis>
</pre>
}}
 
=Step 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/0102){{work in progress}}
There isare 2 kindkinds of data : raster GIS files —surfaces— surfaces with limited precision represented by dots (pixels) — most of time topographic data ; and vector GIS files —dots— dots, lines and polygons—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|thumb|600px|Quality comparison between ETOPO1 (pixelated) and SRTM3 (smoother) data sets. This difference doesn't matter for making large maps with coverage greater than 1000km (~620mi) across.]]
* {{Cite 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=WSG WGS&nbsp;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).}}
* {{Cite 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 &nbsp;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).}}
{{summarizationCollapse|title=: Depreciated 'tiles download' approach|1=
Formerly, highthigh 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:
# '''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.
# '''Find''' the associated GIS files (also called '''tiles'''). SRTM files have names such as "N22E112.hgt.zip", standing for 22⁰ North, 112⁰ East.
Line 145 ⟶ 82:
 
===Other GIS data===
;Provinces:
[http://www.naturalearthdata.com/features/ Naturalearthdata.com] (public ___domain) is a collection of GIS data within the following categories:
* {{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(?<!-- what that ? source : http://www.naturalearthdata.com/features/ -->) |extensions=.zip →.shp |size_compressed=14Mb |size_uncompressed=19Mb |tile_size=whole Earth |tiles_total=1 |comment = <u>For ___location maps</u>, 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 withinwith 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.
Natural Earth provides a range of options in various levels of detail. They are simple to select and work with, so both beginner and confirmed mapmakers will find them useful to download. Use the /Gis_sources_and_palettes subpage to download the suitable files.
 
=Step 0.3: Load a GIS file into QGis as a layer=
[[Image:QGis tutorial - layers toolbar.png|thumb|right|super|450px|1. Add Vector Layer, 2. Add Raster Layer, 3. Remove Layer(s)]]
Loading a GIS file adds the data into your project as a [[Layers (digital image editing)| 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.
Line 163 ⟶ 104:
Since the ETOPO1 data is a raster file, go ahead and add it to your project using whichever ''Add Raster Layer'' method you prefer.
 
<div class="center">
<gallery widths="500px" heights="300px">
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.
</gallery>
</centerdiv>
 
=Links=