Vector Data Analysis Network Analysis_Labs

  • Upload
    ssasadu

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    1/21

    QGIS LAB SERIESGST 102: Spatial Analysis

    Lab 6: Vector Data Analysis !et"or# Analysis

    $b%ecti&e ' Learn t(e Basics o) !et"or# Analysis

    Doc*+ent Version:201,0-1- ./inal

    ontentsIntroduction.............................................................................................................2Objective: Learn the Basics of Network Analysis...................................................2How Best to se !ideo "alk #hrou$h with this Lab..............................................2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    2/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    Introduction

    In this lab, you will learn how to conduct analyses related to linear networks. You will

    learn how to determine the shortest path from origin to destination and how to allocate a

    linear network into service areas.

    This lab includes the following tasks:

    Task 1 Basic etwork !nalysis

    Task " !llocating #ervice !reas

    Objective: Learn the Basics of Network Analysis

    The ob$ective of this lab is for the student to learn how to conduct basic network analysis.

    You will use the %oad &raph plugin to '&I# (esktop, and you will be introduced to the&%!## plugin. You will use some of the networking tools in &%!## to allocate service

    areas.

    How Best to Use Video alk !hrou"h with this Lab

    To aid in your completion of this lab, each lab task has an associated video thatdemonstrates how to complete the task. The intent of these videos is to help you move

    forward if you become stuck on a step in a task, or you wish to visually see every step

    re)uired to complete the tasks.

    *e recommend that you do not watch the videos before you attempt the tasks. The

    reasoning for this is that while you are learning the software and searching for buttons,menus, etc+, you will better remember where these items are and, perhaps, discover

    other features along the way. *ith that being said, please use the videos in the way that

    will best facilitate your learning and successful completion of this lab.

    Tas# 1 Basic Network Analysis

    In this task, you will use the #oad $ra%hplugin to determine the shortest distance

    between two points via a #an rancisco streets layer. You will do this both by shortest

    overall distance and by time traveled.

    . The data for this lab is located on the lab machine at: C:\GST102\Lab 6\Data.

    2. O%en &$I' (eskto% )*+*,

    /. Addthe -!A.(/!.'%eedLi0itsshapefile to &$I' (eskto%*

    01201 Copyright 2013 NISGTC Page 2of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    3/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    . #i"ht click on the layer and choose'et %roject 1#' fro0 layerfrom the

    conte-t menu*

    2i"ure 3: 'treet Layer in &$I' (eskto%

    3. This is a street network for the ity of #an rancisco. O%enthe attribute tabletosee what kind of data you have to work with. otice that in addition having the

    street name and type, there is a column populated with speed limits for each road

    segment. 1losethe attribute table.

    +. /pen the Layer /ro%erties4 'tyleand symboli0e the data by speed limit.

    a. hoose a 1ate"ori5edrenderer

    b. 1olu0n speedlimit

    c. olor ramp $reys

    d. 1lick1lassify

    e. 1lick O6 72i"ure )8

    01201 Copyright 2013 NISGTC Page /of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    4/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2i"ure ): 'tylin" the 'treet Layer by '%eed Li0it

    4. Your map should resemble 2i"ure 9.You can now distinguish the ma$or arteries.

    01201 Copyright 2013 NISGTC Page of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    5/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2i"ure 9: 'an 2rancisco 'treets 'tyled by '%eed Li0it

    5. 'aveyour map as Lab *;"s.

    0. You will use the '&I# #oad $ra%hplugin to find the shortest distance between

    two points on the network. rom the menu bar choose /lu"ins 4 -ana"e and

    Install /lu"ins*'electthe Alltab, and type #oadinto the 'earch bar. heck the

    bo- ne-t the #oad "ra%h %lu"into enable it 22i"ure +3. 1lick 1lose*

    2i"ure +:

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    6/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    6.! new panel for this plugin will appear below the Table of ontents.

    .Before you begin you need to configure the plugin. rom the menu bar, choose

    Vector 4 #oad $ra%h4 'ettin"s. The #oad $ra%h settin"swindow opens.hoose the following settings 22i"ure =3:

    a. Time unit: hour

    b. (istance unit: kilo0eter

    c. Topology tolerance: 3,

    d. 4ayer: -!A.(/!.'%eedLi0its

    e. (irection field: Always use default

    f. #peed field: s%eedli0it

    $. 1lick O6*

    2i"ure =:

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    7/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2.ow you will populate the #oad $ra%hplugin panel 2below the Table of

    ontents3. 1lickthe 'tartlocation button and clickon a spot on the map.

    (o the same for the 'to% locationvia the 'to% locationbutton. #mall dots will

    appear where you have clicked.

    /.'etthe 1riterionas Len"th. ow click 1alculateto find the shortest pathbetween the two points. !fter some processing, a red line will appear as the

    solution 22i"ure 3.

    2i"ure : 'hortest /ath Between !wo /oints on Linear Network

    .To save the shortest path click the %ortbutton. hoose New te0%orary layer

    as the 'elect destination layer. 1lick O6. The shortest path will now appear in

    your Table of ontents.

    3.To make this layer permanent ri"ht clickon it and choose 'ave as+ #ave the

    data to a shapefile in the 4ab 56(ata folder named 'hortest/ath*sh%22i"ure ?3.

    01201 Copyright 2013 NISGTC Page 4of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    8/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2i"ure ?: 'avin" the !e0%orary 'hortest /ath Layer to a 'ha%efile

    +.ow you will determine the shortest drive time between the two points. hange

    the 1riterionto !i0e. 1lick 1alculate. *ith this riterion, you may get a very

    different solution, depending on the points you chose.

    4.1lick %ortto save this layer to a New te0%orary layer@and again, save that

    temporary out to a shapefile. Na0e this file2astest#oute*sh%

    5.#e0ovethe temporary layers from the map, leaving $ust the street network and

    two solutions. 'tylethe 'hortest/athlayer as a red line with a thicknessof ,*+

    and the 2astest#outelayer with a dark blueline of e)ual thickness. *ith thepoints I chose, I had two very different solutions 22i"ure 3.

    01201 Copyright 2013 NISGTC Page 5of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    9/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2i"ure : 2inal 'olutions

    0.'aveyour map file and close &$I' (eskto%.

    Tas# 2 Allocatin" 'ervice Areasow you will use some &%!## tools to allocate portions of the road network served by

    each #an rancisco 7olice #tation. &%!## is a mature and powerful /## &I# software

    package. It has a uni)ue data structure that can be initially intimidating. ortunately,

    '&I# (esktop has a &%!## plugin that provides a much more intuitive interface to the

    large suite of &%!## analysis tools.

    . O%en &$I' (eskto% )*+*, and open 4ab 56(ata6Lab.!ask)*;"s2. This pro$ect has three layers loaded: '2./olice, '2.2ire'tationsand

    '2.'treets.

    &%!## uses its own file format. These layers are stored in a &%!## (atabase, which is

    essentially a folder with containing &%!## data. The &rass (atabase is Lab(ata$#A''db. These data sets have been imported into &%!## from shapefiles. In

    '&I# (esktop they will behave $ust like any other layer. 8owever, since they are storedas &%!## 9ectors, you can also use the suite of &%!## tools with them. These tools

    include a set for network analysis.

    /. irst, you will enable the &%!## plugin. rom the menu bar choose /lu"ins 4-ana"e and Install %lu"ins. The &%!## plugin is a core '&I# plugin. This

    means it is already installed and all you need to do is enable it. 1lickon the

    01201 Copyright 2013 NISGTC Page 0of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    10/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    Installedtab. ind $#A''and checkthe bo- to turn it on. 1lick 1losewhen

    done.

    . nabling &%!## turns on a new toolbar 2below3.

    The data is already set up for you in this '&I# (esktop pro$ect. The following is simply

    an e-planation to get you oriented to the &%!## data structure. %emember &%!## datais stored in a $#A'' database, which again is simply a folder. Inside the database will

    be folder2s3 called Locationsand inside a Locationwill be folder2s3 called -a%sets.

    $#A''db 4 Locations4 -a%sets

    Locationsrepresent a certain spatial e-tent and coordinate reference system that youidentify when you create one. -a%setsare a way to organi0e data and are the data tier

    that actually contains data layers. very 4ocation contains a default -a%setnamed

    /

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    11/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2i"ure 3,: $#A'' -a%set O%en

    4. 1lickthe O%en $#A'' !ools button.5. The $#A'' !oolswindow opens. This is the interface to all the &%!##

    geoprocessing tools. otice that in the title bar of the window it displays your

    4ocation6;apset 2Lab.'an2rancisco-y(ata3 22i"ure 333

    The &%!## Tools window has three tabs: ;odules Tree, ;odules 4ist and Browser.

    The -odules !reeallows you to access &%!## tools organi0ed by theme. The ;odules

    Listhas all the same tools, but they are listed alphabetically with a search bar. The

    Browserallows you to see what layers you have in your open -a%set. You do not yet

    have data in your -y(ata-a%setso there will be nothing yet to see.

    01201 Copyright 2013 NISGTC Page of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    12/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2i"ure 33: $#A'' !ools

    0. The first step in doing a network analysis in &%!## is the build a networkdataset. %andVector4 '%atial Analysis 4 Network analysis4 v*net22i"ure 3)3. This tool will create a linear network of #an rancisco streets and

    attach nodes representing the 7olice stations.

    01201 Copyright 2013 NISGTC Page 2of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    13/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2i"ure 3): $#A'' Network Analysis !ools

    6.(ouble clickon the v*net E Network -aintenancetool. The tool opens as anaddition tab on the window to the right of Browser. !dditionally, the tool itself

    has three tabs. /ptions, /utput and ;anual. The O%tionstab is where you fill outyour parameters before running the tool. *hen you run the tool, it will switch to

    the Out%uttab and you will see details about the running process. The -anual

    tab is help for the tool. ill it out as described below and in 2i"ure 39.

    /T: The inputs are listed as 4ayerame

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    14/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    a. ame of input vector map: '2.'treets 7'2.'treetsF/

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    15/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    .*hile running the Out%uttab will be visible 22i"ure 3+3. 1lickthe View out%utbutton to add the network dataset to '&I#.

    2i"ure 3+: v*net !ool 'uccessfully 2inished

    01201 Copyright 2013 NISGTC Page 3of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    16/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2.or now,leave the $#A'' tools window o%en* You may want to move it to theside so you can see the map.

    /.!urnoffthe '2.2ire'tations and '2./olicelayers..In addition to the linear network, this operation produced nodes for each police

    station point. The View out%utonly added the linear network to '&I#, so you

    will now add the network nodes to '&I#. /n the $#A'' toolbar click the Add

    $#A'' Vector Layer button.

    3.The 'elect $#A'' Vector Layerwindow opens. =nder ;apset: ;y(ata, ;apname #>etwork choose ).%oint22i"ure 3=3.Remember when you ran the

    v.net tool you spe!"!e# that the $D "or the %r layer was 1 an# the no#e layer 2.

    2i"ure 3=: 'elect $#A'' Vector Layer

    +.O%en theattribute table for the'2.Network.) node layer* It has one column

    namedcat with values for each of the 1? police stations 73G3+8* 1lose the table*4.ow that the network dataset is constructed, you will identify the road territory

    that each police station should serve. In the $#A'' !oolswindow switch back

    the -odules !ree tab. 1lickon v*net*alloc E Allocate Networktool. The toolwill open in yet another tab.

    5.ill out the tool form as described below and as seen in 2i"ure 3.a. Input arcs: '2.Network 7 '2.NetworkF-y(ata 3 line8b. Input nodes: '2.Network ) 7 '2.NetworkF-y(ata ) %oint8c. ats: 3@)@9@+@=@@?@@C@3,@33@3)@39@3+ &'T(: these are the values "or

    eah pol!e stat!on "rom the S)*&etwor+*2 no#e attr!bute table.

    d. ame for output vector map: /olice't.Allocation

    01201 Copyright 2013 NISGTC Page +of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    17/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2i"ure 3: v*net*alloc !ool

    0.*hen the tool is set up correctly, click #un. *hen complete click View out%ut.

    01201 Copyright 2013 NISGTC Page 4of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    18/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    26.O%en theattribute table for the/olice't.Allocation layer*otice that it simplyhas the cat I( of each of the 1? police stations.

    2.Before you close the &%!## Tools window switch to theBrowser tab* 1lick the

    #efresh button* %and -y(ata4 Vector and/

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    19/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2i"ure 3: $#A'' !ools Browser (is%layin" -etadata

    2/.1losethe $#A'' !ools window.

    01201 Copyright 2013 NISGTC Page 0of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    20/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    2.To see the results of your analysis you will 'tylethe /olice't.Allocationlayer.O%enthe Layer /ro%erties 4 'tyletab. hoose the following parameters:

    a. %enderer: 1ate"ori5edb. olumn: catc. olor ramp: #ando0 colorsd. 1lick1lassifye. 1lick O6

    23.ow turn O22 the'2.Network )layer and turn ON the'2./olice layer.2+.e-t you will label the 7olice stations with their name. O%enthe Layer

    /ro%erties4 Labelstab for the '2./olice layer.

    a. heck the Label with layer withbo-b. hoose 2A1ILI!.Nas the attribute columnc. 1lickthe !e>t tabbelow and make the font si0e Cand Boldd. 1lickthe Buffer taband click (raw te>t bufferand make the si0e )e. 1lick O6*

    24.Your map should resemble 2i"ure 3C.

    2i"ure 3C: #oad Allocation by /olice 'tation

    = 1onclusion

    In this lab, you were e-posed to basic network routing and allocation analysis. Youcalculated the shortest distance between two points via both time and distance. You then

    01201 Copyright 2013 NISGTC Page 26of 2

  • 8/10/2019 Vector Data Analysis Network Analysis_Labs

    21/21

    %&I' LAB '()I(' * Lab + , !ector -ata Analysis * Network Analysis

    determined which portions of the network that should be allocated to each police station.

    There are many applications for this type of analysis including emergency management,parcel delivery, and general navigation.

    (iscussion &uestions

    . *hat is a real world application of network analysis@ -plain.2. 8ow can a network analysis benefit the logistics industry@/. *hat other linear networks could this apply to other than roads@

    ? 1hallen"e Assi"n0ent

    The #an rancisco 7olice (epartment has shown your analysis to their colleagues at the

    ire (epartment and they were impressed. ow the ire (epartment would like the sameanalysis done for their stations. In the 7%;!T mapset there is a #>ire#tations

    &%!## vector layer. %epeat the steps in Task " to create the same allocation analysis for

    the ire (epartment. ompose a map of the results of the ire (epartment analysis.