Wikipedia:Graphics Lab/Resources/QGIS/Importing OSM roads

OpenStreetMap data importation

 * → waiting a volunteer, source: This French section.

For small area from villages to towns to small states (< 200 x 200 km), it is often great to add roads, railways, buildings areas provided by OSM.
 * Concept


 * Import OSM data to QGis


 * Applying colormaps

Translated from French
This series of short tutorials designed to learn how to create a map with Quantum GIS (QGIS) and possibly Inkscape in addition.



QGIS is a Geographic Information System (GIS). This means that unlike Inkscape, QGIS can manage data files geolocation and geotag raw (often in the format TIFF and  shp ) which can be found on the internet (mostly). Inkscape is a powerful graphical tool that will enhance the files SVG created by QGIS. Wikipédiennes (in Qml) | from [stylesheets] [stylesheet] will be used for the exported map in QGIS to SVG format is immediately in the style corresponding to  conventions of Wikipedia. This will reduce the level of manual intervention in Inkscape.

To summarize, each of these tutorials is to create a type of film, and each tutorial follows this principle: download raw data → georeferenced application data of a sheet of QGIS style (+ possibly reprojection) → Export SVG by QGIS → valuation in Inkscape (minor corrections, various additions, etc..). (Note: for export in SVG can be, if you will, export all layers at once.)

It may also (depending on card type) use Gimp, 3DEM or / Global Mapper.

Reading or at least the overview of the latest manual dated QGIS is strongly recommended.

prerequisite Notions: Anglicisms: Matrix = * = bitmap raster vector ≠
 * The layer s QGIS work like layers of Inkscape;
 * Highly recommended reading articles Tagged Image File Format and Shapefile;
 * Georeferenced file (either vector or raster) ≠ non-georeferenced file (either vector or raster);
 * Graphics software (Inkscape) ≠ mapping software (QGIS can "read" the georeferencing of a file);
 * With matrix as well as vector sources, you can create files via QGIS matrix as well as  vector;
 * Vector graphics consist of points, lines and polygons (and possibly polylines or relations).
 * Geographic marker = Geotagging = tag geolocation ≈ attribute (there can be no purely geographical data in attributes). QGIS supports these markers, unlike Inkscape.
 * Layer = layer = layer (layer is the literal translation of layer and was chosen in the translation of QGIS software. The term layer is perhaps more telling.)

Preparation and software
Install software (their installation is very simple in XP such as Linux)


 * [[Image:Logo qgis.png | 30px]] QuantumGIS, http://www.qgis.org/ (no need to install North Carolina, South Dakota and Alaska data set);
 * [[Image:Inkscape_logo_2.svg | 30px]] Inkscape http://inkscape.org/?lang=fr
 * (Useful in some cases) 3DEM available on site visualizationsoftware;
 * (Useful in some cases) Global Mapper;
 * (Useful in some cases) [[Image: GIMP_Icon.svg | 40px]] The GNU Image Manipulation program, http://www.gimp.org/.

QGIS extensions
In QGIS, install these extensions or check that they are installed (QGIS 1.8 > Extensions > Plugin Installer Python):
 * Plugin installer (Extension Manager);
 * GDAL tools (tools for processing raster files);
 * FTools (processing tools vector files);
 * OpenStreetMap plugin (OSM files to integrate as layers.)
 * Polygonizer (Polygonize for intersecting segments);
 * MMQGIS (to add a text layer).

Then go to Extensions > Extensions Manager and check extensions GDAL tools and OpenStreetMap plugin (which are unchecked by default).

Install one of these two additional extensions (or both) only if you can not have Linux just long enough to create shaded relief with extension Hillshade that only works on Linux :
 * DEM terrain shader, to create a shaded relief (Windows);
 * Raster Terrain Analysis plugin, same goal (Windows and Linux).

You can install these optional additional extensions:
 * (Totally optional but interesting) Value Tool, which displays a panel in the altitude of the terrain under the mouse;
 * (Optional but interesting) SimpleSVG, which allows you to export very simply view svg displayed in QGIS;
 * (Totally optional) GRASS, GRASS tools allow various manipulations;
 * (Optional and untested) import SRTM elevation for QGIS (would, in theory, to download directly from SRTM to QGIS).

Import data into QGIS


Import files using the buttons described below. Each layer imported into QGIS contains a data type (points, lines, polygons). Note: a OpenStreetMap (specific button) extension .osm corresponds to three layers (points, lines, polygons)..

It is normal for the matrix layer appears gray, since you still have it applied any style. Similarly, each vector layer appears when loaded in QGIS is a random color.

Provide a projection project
.



Enable default projection on the fly. It is better, even before loading a layer to activate immediately the projection on the fly: QGIS 1.8 > Preferences > Options > SCR >  Enable check on the fly reprojection default. You can more easily reproject your data. Note: projection EPSG: 4326 - WGS84 is the default Equirectangular (lat / lon or flat), which "flattens" forms when the area is close to the poles. An equatorial zone will not show unsightly disfigurement.

QGIS displays raster or vector data in the projection you have him before indicated.

To choose a projection to your project, QGIS 1.8 > Preferences > Project Properties >  select the desired projection in the list. When you import your raster and vector layers in the current project, they should be displayed directly in the right projection (but for rasters you will first a gray rectangle which will be applied later style topographical colors).

To choose the projection or create a custom projection, see User:Yug/Projection_sous_QGis_(brouillon)

To go further
Available on the Internet, complete tutorials on Quantum GIS:
 * official documentation (Manual for QGIS).
 * Tutorial.

Active forums and portals:
 * GIS forum (and GIS portal associated ).