Successfully reported this slideshow.
You’ve unlocked unlimited downloads on SlideShare!
Lets Try For U & Me Map-Makingwith QGIS Part—1Have you ever wondered how maps are made? In this article, we will take our first step towardsmaking maps from spatial data using Quantum Geographic Information System (QGIS).Q GIS is one of the most widely used open source desktop tools for map-making and basic GIS analysis.You can download it from http://download.qgis.org. QGIS is usefulfor visualising and editing spatialdata, and for querying its features.Features are the geographical objectsin the layer, e.g., each individualairport is a feature in the airportslayer. A feature will have attributesdescribing it, such as the geometry,name, category, etc. QGIS has a Map Composer,which allows you to add the essentialmap elements and get the map print- Figure 1: Alaska and Airports shapefilesready. QGIS comes with dozensof handy plug-ins, and a Pythonconsole, just in case developers wantto interact with the data through thecommand interface. For this tutorial,we will be using version 1.7.3 withthe Alaska dataset available at http://download.osgeo.org/qgis/data/qgis_sample_data.zip.Visualise shapefilesQGIS supports most common vectorfile formats—Shapefile, KML,GML, GPX, etc. The procedure toopen the files is the same for allformats:1. On the menu, click Add Vector Layer. Figure 2: Layer styles www.LinuxForU.com | LINUX For You | JUNE 2012 | 31
For U & Me Lets Try2. Browse to the source (for our example, the qgis_sample_data/ shapefiles directory).3. Select the files (in our case, alaska. shp and airports.shp). Figure 1 shows the Map Canvas with the Alaska and Airports layers.Layer stylesStyling allows us to set fill colours,patterns, borders, icons, etc, for thefeatures in the layer:1. Right click the Airport layer in the Layers panel and select Properties.2. Under the Style tab you can change the symbol and colour, the size of the symbol, set transparency, and categorise the features (see Figure 2).Layer labels Figure 3: Feature labelsLabels are text identifiers for features inthe layer. QGIS allows you to choose theattribute you want to show as the label,and set its style too (see Figure 3):1. Right click the Airport layer and select Properties.2. Under the Labels tab, check mark Display Labels.3. Select the Field Containing Label; this is the text to be shown on the layer.4. Set the font size, colour, type, and the text position with respect to the feature location.Attributes tableAttributes describe the features ina layer. The attribute values can beedited and queried. To view attributenames and data, right click the Airportlayer and choose Open Attribute Table. To query features of your interest,add the text to filter the data in the Look Figure 4: Feature selectionFor text box, and select the desired field.For instance: look for ‘Military’ in the format as ESRI Shapefile and save. publish a map, plot custom data andfield ‘Cat’. Then hit Search. You will In Part II, we will learn how to perform geoprocessing.find that all military airports are selectedand highlighted in the Attribute Table, By: Sagar Arlekar & Niket Narangas in Figure 4, and on the map. For The authors are researchers at the Center for Study of Science, Technologycomplex queries, try Advanced Search. and Policy (CSTEP), Bengalore. They work in the fields of GIS and Agent-Based Selected features can be saved as Simulation. At CSTEP they have built a web-based GIS framework to simulate and visualize disaster impact. They love working with open source tools and are activea new shapefile: click Layer > Save contributors to Openstreetmaps.Selection as vector file. Select the32 | JUNE 2012 | LINUX For You | www.LinuxForU.com