exercise 2a – validating topology 2.pdf · if you would like to replicate table 2 of berman et al...

16
Exercise 2A – Validating Topology: 1. Install plugin Topology Checker. [Note: If is already installed, but you cannot find the button go to Plugins | Manage and Install Plugins and see if the box in front of the Topology Checker is checked.] 2. From folder Exercise 2 load shapefile murdock_sample.shp 3. Change to transparent fill 4. Click on Topology Checker 5. Click on Configure to set topology rules 6. Check for duplicates. 7. Click OK and then click “validate All”

Upload: others

Post on 21-Apr-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

Exercise2A–ValidatingTopology:

1. InstallpluginTopologyChecker.[Note:Ifisalreadyinstalled,butyoucannotfindthebuttongotoPlugins|ManageandInstallPluginsandseeiftheboxinfrontoftheTopologyCheckerischecked.]

2. FromfolderExercise2loadshapefilemurdock_sample.shp3. Changetotransparentfill

4. ClickonTopologyChecker

5. ClickonConfiguretosettopologyrules

6. Checkforduplicates.

7. ClickOKandthenclick“validateAll”

Page 2: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

8. Noerrors.9. ClickonConfigure10. Selectrule1and“DeleteRule”11. Addnewrule“mustnothavegaps”12. ClickOKandthenclick“validateall”13. Errors

14. SomeGapsarefine

…othersarenot

Page 3: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

zoomin(alot)

15. Processing|ToolboxSearchfor“v.clean”

16. Setv.in.ogrtoleranceto0.1

Page 4: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

17. Createsnewlayercleaned

18. SaveasMurdock_nogaps.shp

19. Tryforyourself:CheckiftherearestillgapsinMurdock_nogaps.shp

20. Tryforyourself:Checkfor-invalidgeometries-multipartgeometries-overlaps.

Page 5: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

Exercise2B–QueryBuilder:

1. FromthefolderExercise1loadshapefileStGallen_roads.shpandStGallen_buildings.shp.

2. DoubleClickonStGallen_buildings.shp

3. OpenTab“General”

4. Click“QueryBuilder”

5. In“Fields”clickontypeandin“Values”clickon“All”

6. Setafilterthatonlydisplaysresidentialbuildings"type"='residential'

Page 6: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

7. Clicktest

8. ClickOkandOk

9. DuplicateStGallen_buildings.shp

10. Saveduplicateas“StGallen_residential.shp

11. RemoveStGallen_buildings.shp

12. Repeatsteps2-11forStGallen_roads.shp.Insteps5and6usefclassandsetafilterthatdisplays“motorway”and“primary”.

13. ExporttheimageStGallen_Homes_near_Motorway.png

Page 7: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

SpatialQuery

Page 8: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

Exercise2C–EraseGasFlares:

1. FromthefolderExercise1loadshapefilecountries.shp.2. CreateaQuerythatfiltersonlyAfricancountries(continent=Africa)

3. SaveasAfrica_country_bnd

4. FromthefolderExercise2loadshapefileFlares_Lybia1.shp.

Page 9: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

5. ChangetheCRSofbothLayerstoWorldEckertVI

6. CleanFlares_Lybia1.shp-Processing|Toolbox-Searchforv.clean

-SelectGasflareslayerandincreasethresholdto3.1(smallervaluesmightworkaswell)

-

7. Vector|GeoprocessingTools|Difference-InputLayer“Africa_country_bnd”-DifferenceLayer“cleaned”

Page 10: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

8. Savenewlayer“Difference”asLybia_Clipped9. ExportImageLybia_Clipped.png

Page 11: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

Exercise2D–Union:MurdockEthnicHomelandsandAfricanCountryBoundaries

1. FromExercise1folderloadshapefileAfrica_country_bnd.shp2. FromExercise1folderloadshapefilemurdock_ea_2010_3.shp3. CheckifCRSofbothshapefilesisconsistent.4. Generatetransparentfillforbothshapefiles.5. Changetodifferentboundarycolours.

6. Vector|GeoprocessingTools|Union7. Input1Africa,Input2Murdock.8. CheckResults9. Slivers?

Page 12: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

Exercise2E–SpatialJoin:Conflict,Mines,andADM2

1. FromExercise2folderloadshapefileadmin_Merge_Corrected_Africa.shp2. TransparentFill3. CheckCRS(WorldEckertVI)

4. AddXYDataLayers|AddLayer|AddDelimitedTextLayer

Page 13: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

5. FromFolderExercise2import-Berman_Mines.csv-Berman_Acled.csv

IMPORTANT,pickWorldEckertVICRS.

6. SaveBerman_MinesandAcledaslayers.(CRS!!!)

7. Vector|DataManagementTools|JoinAttributesbyLocation

Page 14: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you

8. SavenewLayer

9. Saveas..|ChangeFiletypeto.csv|OKtosavetheattributetable.ClassroomDiscussion1:IfyouwouldliketoreplicateTable2ofBermanetal(2017)attheADM2level,howwouldyouproceed?ClassroomDiscussion2:IfyouwouldliketoreplicateTable2ofBermanetal(2017)atthegridcelllevel,whatwouldyoudo?

Page 15: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you
Page 16: Exercise 2A – Validating Topology 2.pdf · If you would like to replicate Table 2 of Berman et al (2017) at the ADM2 level, how would you proceed? Classroom Discussion 2: If you