Home
Introducing QGIS Plugins
Contents
1. Spatial Query Spit Figure 7 a Navigating to the Fetch Python Plugins button b Installing the OpenStreetMap plugin using QGIS Plugin Manager Plugin Directory Q PJ1011MD 5AG apps qgis plugins Downloading OSM data We are going to practice using the OSM Plugin by downloading data of Edinburgh from the OSM server To download data click on the OSM download button Figure 8a A dialogue box will appear requesting the extent of data desired a file location to save the data to and a scale preference The default extent options will be set to the extent of the current map view If a lot of OSM datasets exist within this view a message will appear saying extents are too large See Figure 8b Essentially the QGIS user is only able to download a certain amount from the OSM sever at any one time and the extents chosen within this dialogue box gage how much data will be downloaded The QGIS user has to limit the extents until they contain a downloadable amount of data Download OSM data Extent Latitude From 55 3645271637 To 56 4922940386 Longitude From 4 4952954859 To 1 7407332708 Download to C Users rstedham AppData Local Temp 121012_140633_downloaded osm Open data automatically after download data current layer will be removed X Use custom renderer Small scale Cancel Figure 8 a The OSM download data icon and b the OSM Download dialogue Task Zoom to an area of Edinburgh equivale
2. iccale wel bicycle yes created by 2 Potlatch 0 100 foot yes highway cycleway ramp cycleway highway footway footway barrier wall electrified contact line frequency 30 gauge 1435 yer name East C a a footway East Coast Mai nao toot yes footway a henderson Brandon Terrace tertiary Me Lan highway unclassified name z High School Wynd High School W unclassified Strange bu unt bicycle yer foot yes highway 2 service name Rose Street oneway true Rose Street service jarmesks highway unclascfied name Crichton Street Crichton Street unclassified Parercao abutters reta highway tertiary name Fredenck Street Fredenck Street tertiary a henderson hig maay bertiary maxspeed 3 moh name Brandon Steet Dundas Street name Brandon e im tertiary phut highways nessdential name z Hatton Place Hatton Place residential Centri America highway rnessdential name Montpelier hionipelier residential E footway highway z Tocbway Choose the field being searched Enter in the search term Itis case sensitive Identify the search term being utilised Figure 12 Sub selecting data from the OSM file Step 2 Save the Selection as an ESRI shapefile Task From the ine layer s menu select Save Selection As Figure 13a browse to a
3. E of WGS 84 Save Selection As itasets Edinburgh Datasets Roads Roads shp Encoding System Layer CRS OGR creation options Properties Rename Copy Style Add New Group al Expand All Collapse All Update Drawing Order Skip attribute creation saved file to map d Quantum GIS 180 Eile gda View ayer Settings Plugins Vector Raiter Database Web Help 544 amp d cG amp A4e fo eo0928u98 Fas eh i 7 y OS S e Se RUN ARS co9 0929209752520c e MW etQarXa2eaarro x 5 fo a 5 OS ce i T j d Id pi 1 JO T o es Y i r A lt c i Y Le Y i e g A P 4 s L 7 1 a gt FX J f s lt is a T 7 Y v 4 e d om i A e 3 X gt gt x nl T ji 2 D f t pa Bi L YS e ge o a el C a s e V a oe i arr f ica CN ER N Y P p TX P Ae X A 9 e a8 2 Y as M Leth A T 9 3 e n JA e WA hose ie 1 s LR Y A Pu Lo A y LL AT E MAA 5 PT X n rae f K a j Neve Sis UB s 8 ANM et er On f S e oo e AS j sA 2 i g i M i ER j j d c TC athe Ve EN vue Dr y N A Aee WA pe A v Tt Ce 4 a s a X AS TA EI n NY ond b a4 ane S Ze x o 3 j y H fu 7 m 9 p i Y T Y J o E T 1 A nm A A V x 2 ERE ho A f 4 3 Control rendering order Pl Coordinate 3594037450728 Scam 123923 FR Reeder lescas IONA Figure 14 Maps and Pubs in Edinburgh s City cent
4. M nis Mim amp qm g ma is Lo zoom 17 Permalink Service by Geofabrik GmbH All map tiles copyrighted by their providers Data license ODbL 1 0 Contact Done Figure 5 A comparison of OSM and Google Maps for an area of Saint Marc Haiti viewed through the Geofabrik site hhtp tools geofabrik de mc It is visible from the image that OSM provides a more detailed map of the region than Google This is the case for many remote areas that OSM has reached where commercial map serves have less incentive to map The OpenStreetMap plugin has been designed to download edit create amp upload data osm files to support the OSM project The OSM plugin is mentioned here for two reasons 1 You your organisations can download data from the OSM server to support GIS projects The OSM project has gained popularity in recent years and increasingly is becoming the key map provider for countries where commercial map servers have no incentive to cover For example since the 2010 Haiti earthquake OSM coverage has expanded throughout Haiti including large scale mapping programmes in both Port au Prince and Saint Marc Figure 5 with future OSM projects being planned across several rural communes 2 You your organisation can support the OSM initiative by uploading data to the OSM server Each of you can contribute to the OSM project Once data is created for the benefit of your project it can be uploaded to the OSM server with great eas
5. QGIS Openlayers OpenStreetMap and Geo referencing practical The purpose of this practical is four fold To introduce QGIS Python plugins architecture Tointroduce the OpenLayers plugin To introduce the OpenStreetMap OSM initiative its importance as a source of freely available data worldwide and the OSM plugin that enables the QGIS user to download OSM data To do this we will be using data that centres on Edinburgh and the surrounding area QGIS python plugins QGIS has been designed with a plugin architecture This allows many new features functions to be easily added to the trunk basic application that we became acquainted with in the previous practical A large number of the features in QGIS are actually implemented as plugins There are two groups of Plugins Core Plugins are maintained by the QG S Development Team and are automatically part of every QGIS distribution These are loaded unloaded to the main QGIS interface using the Plugin Manager See Figure 1 External Plugins are stored in external repositories and maintained by the individual authors They can be added to QGIS in the Python Plugin Installer see Figure 2 Loading a QGIS Core Plugin Loading a QGIS Core Plugin is done by selecting Manage Plugins from the main Plugins Menu Figure 1a Plugins Vector Raster Web QGIS Plugin Manager Fetch Python Plugins i Python Console Enabled plugin Filter To enable disable a plugin
6. anager It should be in the list of core plugins If however it is not install it using the Plugin Installer Task Navigate to the OpenLayers plugin menu and select a service Figure 3a NB Satellite Imagery Services can be very slow to load so it is advised to choose a basic map Task Because we do not have a dataset for Edinburgh already we will have to navigate to Edinburgh using the zoom and panning tools shown in Figure 4 below Try this now f 2 SIR G F 7 P 2 P zX amp b DX vE O Figure 4 Navigation tools used to centre the map canvas on the area of interest in this case Edinburgh The OpenStreetMap Initiative The OpenStreetMap OSM project is an initiative whose goal is to create a free editable map of the world established to bypass the legal and technical restrictions that most geographic data has Registered users can add Vector data to the map either by uploading GPS data or digitising features from the aerial photography held by the server E Map Com Geofabri 2 illa Firefox Map ompare ofabrik Io Mollis a taa oe s i am ote File Edit View History Bookmarks Tools Help Y 4 A se http tools geofabrik de mc x 3 7 geofabrik P A Most Visited _ Getting Started Latest Headlines __ The University of Edinburgh x Q 1939 unread rlstedham xX Ga BBC Weather Chimoio x MyEd Today x E4 Ma
7. dick its checkbox or description Add Delimited Text Layer 2 RS oem oads and displays delimited text files containing x y coordinates Short Description Installed in Layers menu toolbar About the plugin Coordinate Capture t Capture mouse coordinates in different CRS Installed in Vector menu toolbar DB Manager 0 1 20 Disabled plugin CSF Installed in Plugins menu toolbar Diagram i plugin for placing vector layers Installed in P Plodins is menu i toolbar dy Dxf2Shp Converter Converts from dxf to shp file forma Installed in Vector menu o Plugin Directory C OSGeo4W apps qgis plugins LI To enable a plugin click its checkbox or description Figure 1 a Navigating to the Plugin Manager and b The Plugin Manager The Plugin Manager lists all the available plugins and their status including all the core plugins and all external plugins that have been installed and automatically activated using the Python Plugin Installer Those Plugins already loaded have a check mark to the left of their name In the instance shown in Figure 1 the Add Delimited Text Layer is already loaded The Coordinate Capture DB Manager Diagram Overlay and Dxf2Shp Converter plugins are installed but have not been loaded to the main interface To enable a particular plugin click on the checkbox to the left of the plugin name and click OK When you exit the QGIS project the list of loaded plugins is retained and next time you run QGIS t
8. e OSM uses the osm file type This is a Vector dataset and supports feature types similar to that of the ESRI Shapefiles i e point polyline and polygon data types Uploading personal datasets vector to the OSM server will not be covered by this practical For information on how to do so please refer to the QGIS User Manual found on the www ggis org site The OSM plugin toolbar In recent versions of QGIS the OSM plugin toolbar Figure 6 can either be found in the main toolbar area at the top of the screen or within the Plugin menu Figure 6 The OSM plugin toolbar Installing the OSM plugin The OSM plugin is a core plugin and if not already part of the QGIS interface can loaded in the Plugin Manager as shown in Figure 7 below Plugins Raster Vector Help a QGIS Plugin Manager Fetch Python Plugins Filter 41 Manage Plugins Python Console To enable disable a plugin dick its checkbox or description a MapServer Export Version 0 4 3 Coordinate Capture x Export a sawed QOIS project file to a MapServer map file Decorations Dxf25hp eVis j NorthArrow x A Displays a north arrow overlayed onto the map Georeferencer Gps GRASS Interpolation OpenStreetMap plugin Version 0 5 Viewer and editor for OpenStreetMap data Access Oracle Spatial GeoRaster Plugin Installer Version 1 2 1 x E Downloads and installs QGIS python plugins MapServer Export Raster based terrain analysis Road graph
9. etMap Google Maps Bing Maps layers and more To install select a installed OpenStreetMap plugin k Viewer and editor for OpenStreetMap data f installed Tools 5 Tools for vector data analysis and management pl ugin and hit the Install Upgrade plugin icon The plugins wil be installed to agis python plugns 94 QGIS Python Plugin Installer 128 plugins available EN c Plugins Repositories Options Status Name URL connected QGIS Official Repository http plugins qgis org plugins plugins xmi Select to add repositories to the plugin installer Then enter repository name and URL Help The plugins wil be installed to q9is python plugins Cose A Figure 2 a Navigating to the Python Plugin Installer b Installing Python Plugins using the Plugins Tab of the Python Plugin Installer and c Adding new repositories to the python plugin installer using the Repositories Tab Task Navigate to the Plugin Installer and read the descriptions of the range of plugins available Hopefully there are some that you think will be useful to your work at some stage Now that we have introduced Python Plugins let s try using a couple that could be applicable to a wide range of projects The OpenLayers Plugin The OpenLayers plugin allows you to add a number of image services from Google Bing Yahoo and OpenStreetMap to the map canvas see Figure 3 WARNING The acquisition date of the Satellite imagery fro
10. g are shown at the top of the window Figure 12 d This selection process can be done with any type of Vector file States the number of features whose attribute meets the search criteria 131 200 7 09 03 TOO 2009 10 17T11 1433 2009 09 01T19 434 FU REIEEIFAR EN 2011 10 29T14 2012 07 TLE Central America Strange but unt pra capasecumpie Central America bicycle yer foot yes highway residential name 2 Sunbury Mews foot yer highway cycles Ecnested by 2 JOSM higheay residential name Priesthield Grove hig maay SAVE Poe resedential name z West Adam Street hi ghway fo obway james Platform 9w railway platfom ref Bw highway s unclassified name Lochin Derace note Worth side of Street amp Thomvyba term are highlighted Sunbury Mews Priestield Greve West Adam Str Lochnn Terrace residential cycleway residential service residentral footed 1 unclassified Records containing the search a henderzon vervice chidot Mice l 437 2010 01 14T23 highway sevice perice z parking aisle 138 2009 04 07T10 439 2012 02 15T16 apsicumpie 2011 10 31T20 phut j AM 2 06 191T11 rruchau bucycle z i3 2011 05 13T21 144 Ev EC ERU 145 Puck 446 2010 04 06T10 2012 0 4 Tbe 2011 05 13T21 1149 2011 09 05T13 2010 06 08T11 EET 2011 06 29717
11. hese plugins are automatically loaded TASK Navigate to the Plugin Manager and identify which plugins have already been installed Try loading one of these to the QGIS interface that you think will either be useful to you at some stage or that interests you and you would like to experiment with Loading an external plugin External QGIS plugins are stored in various external repositories maintained by individual authors These plugins are accessible via the Python Plugin Installer found via the Fetch Python Plugins button in the Plugin Menu See Figure 2 Plugins Vector Raster Wet 4 QGIS Python Plugin Installer 128 plugins available E Fetch Python Plugins ai LA Manage Plugins A Python Console E k Creates a polygon from azimuths and distances Plugin descriptions AniMove Triangulation of telemetry bearings Developed with f Export the map canvas to a Garmin Custom Map Ckmz file Manages the attribute table structure WMS highres orthophotos and WCS 25 meter n The status states whether the plugin is Download Help to create mask Calculates the directional slope along given directions new new new new new new new new new i Save notes in QGIS projects already installed QuickMultiAttributeEdit plugin want to be a very quick and h Quick WKT WKB viewer this Qgis Plugin opens a dialog wher a Run scripts to automate QGIS tasks installed OpenLayers Plugin 0 OpenStre
12. il Inbox 16 x lt Map Compare Geofabri x GEOFABRIK tools Switch tool v pag ppd amp Help N tool Choose map type OSM Mapnik iv Choose map type Google Map v y Uc a UOI REERETS2012 Terms of Use Es F 4 9 Rue Alta Paul Mm e ole 7 A tt y m z gt Ur Regard n e i Di B Le Palmier 3 cit Miami 2 ac neau g TA Py 5i College amp Mp Rue Emille Miot g pode 5 gt Capais m e j R Rue Ecole selle Oe sey ag J s Crasse Martin Ej Tie RN 7 r i Joine 73 4 m 5 faite 8 t F Beaubere m 5 RS gospel f 4j Net Multi Services r raan 7 bernac Sn gin R g E ise de ue 1 H aque t des Laurier insptution oss T Eglse de Classique 86 r Dieu Gist Humanste a levien j TB log de Saint Marc F Lm R 25 i i qi f ot Ruelle D Coins Rue 53 L Iv sir bar resto boss 3 Dp Kebra Brace Va Ld d im T a Ron Ruelle L Rue A 65 656713 Sbosd M Caona So E t 10 10g r Assembl e Mp 15 99 feflannei des Rachetes sse Sac net e R Q Rue H 25 ue Kebreay gt 52 s fio A oer g ctor Paultre P amp ees rae Tenge ee f 4 CAS glise Gloire i E Pa 8 7 8 L eternel ADG Q Ssa i T 1 ky ie is Ima ec Se tor Paultra oo Guillaury Im ze D EET 9 HN hd passe g nt SE ae Vere Cu m Coll fi f j glise confraternine bas 108 g Mix j Se Foy f 4 freedop au SA Ej N fichaud 23 rA 2 p 9 El aS p 1 V 2
13. ing the identify tool or By opening the attribute table selecting a feature and zooming to that selected feature Sub selecting OSM Data In many instances we will not want to use the whole dataset available from OSM but just a sub selection of the dataset for example roads and pubs in Edinburgh s City centre We want to know where the pubs are and the road layout to get to them I acknowledge that other features in the town would be useful to find the pubs but for no good reason we just want a map of roads and pubs This is achieved by 1 Selecting the datasets that you would like to use 2 Exporting the selections to separate Shapefiles and therefore layers Let s try this with Roads and Pubs from the OSM dataset that we have downloaded Step 1 Selecting roads from the lines dataset Task Open the attribute table of the ines dataset Look to see how roads are labelled in the attribute table You will notice that they are tagged as highway within the tags column Figure 12 a Set up your selection by entering highway into the search box at the bottom of the attribute table dialogue Figure 12 b Choose the tags field from the field drop down box Figure 12 c and press Search Figure 12 c Use the scroll at the right hand side of the attribute table to scroll down the attribute table Notice that all the highways have been selected highlighted features The number of features with the highway ta
14. m these services will vary considerably between locations and providers The date shon in the corner of the image is the date that the image was bought not captured The OpenLayers Plugin uses your view extent to fetch the data from the service you choose For this reason it is useful to load a layer that centres on or near your area of interest first but you don t have to To use this plugin you require a good connection to the internet If the connection is not good the layers will either fail to load or load too slowly to keep up with your view extent Plugins Vector Raster Web Help E Fetch Python Plugins we e e e CA Manage Plugins Python Console amp 7 ey Ch 3 OpenLayers Overview NE aaa Google Physical layer Fs Add Google Streets layer IM Aad Google Hybrid layer B Add Google satetiite layer P Add OpenStreetidMap layer ue Add OpenCycleMap layer JE Add OCM Landscape layer Pz Add OCM Public Transport layer amp 9 Add Yahoo Street layer n Add Yahoo Hybrid layer Add Yahoo Satellite layer lt Add Road layer m Add Bing Aerial layer Ic Add Bing Aerial with labels layer Add Apple iPhoto map layer Figure 3 a Navigating to the OpenLayers Plugin b Google s Terrain Map accessed via the OpenLayers Plugin and c Google s Satellite Imagery accessed via the OpenLayers Plugin Task If the Openlayers Plugin is not already loaded to QGIS load it using the Plugin M
15. nt to that shown in Figure 9 Click on the download OSM data icon Figure 8a If the extents are still too large enter the longitude and latitude values displayed in Figure 10 A message will appear to say that the extents are now acceptable Navigate to a suitable location within your filing system to save the osm data would suggest that you save it to your Data folder under the name OSM_Edinburgh_ centre Press the Download button once everything has been set Once the download is complete the OSM datasets will be loaded to the map canvas Once loaded remove the Openlayers layer to make QGIS faster Fee Edit View ayer Settings plugins Vector Raster Database Web Help ta d d 5o BAP ete CPCRKER ZE2 7 7F OF BB wt 8 Ss KRDO eORRA BFZODABRSFrHOOC eS OU WAM SNAR IIA x UN US UU U3 3 CH Hexen S Control rendering order Figure 9 The extent of Edinburgh for which we would like to download osm data Figure 10 left The Download OSM data dialogue showing an accepted extent C Users rstedham AppData Local Temp 121012_ 161109 downloaded osm Open data automatically after download Figure 11 below left a OSM data downloaded as three layers b downloaded OSM data in the Map Canvas C Replace current data current layer will be removed 2 Use customrenderer smalse 0000 Quantum n EE Vedar wee j BBas Qe PCCP PKR ZENtKoOKPXAD vA Wa t a De ORE BM B8ONGR xl 5 5 D C
16. ppropriate folder to save your Shapefile name is Edinburgh Roads and select add saved file to map Figure 13b Once you press Ok the Edinburgh Roads Shapefile will be added to the Map Canvas Repeat the task for Pubs The outcome should be a map like that shown in Figure 14 The Vector layers can be labelled and their symbology changed as was done in the previous practical Task In the new Shapefile open the attribute table and delete fields that you do not find useful e g the fields Timestamp and User by pressing the edit icon Figure 15a then the delete field icon Figure 15b and finally selecting the fields that you want deleted and ok NB Because of the nature of information within the attribute table you may wish to create a new field in the attribute table that holds labels that you will want to use to identify the features Although this is time consuming it is worth having a clean set of information that you can use for labels Task As a final task use the panning and zooming tools to centre the map scene on your home town country project area and identify which datasets are available for download Download them and save them to separate Shapefiles that you can use at a different time b ive vector layer 25 1g Format ESRI Shapefile x tie x Zoom to Layer Extent Show in Overview eB Remove a Set Layer CRS Set Project CRS from Layer Open Attribute Table CRS db
17. re downloaded from the OSM server and converted to separate ESRI Shapefiles Z Delete Attributes timestame Figure 15 Deleting fields from an attribute table that aren t useful to the User
18. w E X 15 tdnburgh cente points X E dinburgh centre tines x amp Ldiniburgh cente potygons di M A 29 PS os E A n pate D SM Ses la hs 6 D Cc Coortinate 359408 7958771 con 121006 v SV 0 Render to50 3857 Exploring OSM Datasets Task Open the attribute layer in turn for each of the OSM datasets There are several things to notice about OSM datasets that differ to the standard ESRI shapefile datasets 1 OSM is downloaded as three layers all features that are a certain type e g points are stored to one layer see Figure 11 a l e All point features are stored to a points layer independent of whether they are a post box place of worship or school All line features are stored to a lines layer independent of whether they are a road river or railway All polygon features are stored to a polygons layer independent of whether they are a building piece of parkland or other type of land use 2 There are attributes within the attribute table that are not usually included in an ESRI shapefile attribute table including Timestamp The date that the feature was added to the OSM server User The registered person that added the feature to the OSM server 3 The attribute table is quite messy because of the way that data is added to the OSM server Querying OSM Data OSM datasets can be explored exactly as an ESRI Shapefile was in the previous practical either By us
Download Pdf Manuals
Related Search
Related Contents
ONwalk 900 Programación Aplicada y Lab. - Coordinación de Ingeniería en IML Tools User Manual HP iPAQ hx4700 User's Manual Recruter – intégrer – fidéliser les jeunes fidéliser les Installation and Operating Instructions Disbursements Part 1 Copyright © All rights reserved.
Failed to retrieve file