literate programming and the process of gis
DESCRIPTION
GIS in the Sciences ERTH 4750 (38031). Literate Programming and the Process of GIS. Steve Signell , Instructor ([email protected]) Robert Poirier, TA ([email protected]) School of Science Rensselaer Polytechnic Institute Monday, March 17, 2014. Literate Programming. The process of GIS. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/1.jpg)
Literate Programming and the Process of GIS
Steve Signell, Instructor ([email protected])Robert Poirier, TA ([email protected])
School of ScienceRensselaer Polytechnic Institute
Monday, March 17, 2014
GIS in the SciencesERTH 4750 (38031)
![Page 2: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/2.jpg)
Literate Programming
![Page 3: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/3.jpg)
The process of GIS
• What is the task?• What data do I need• What analyses do I need to perform.• How is the data to be presented
(Maps/Reports/Web applications…)
3
![Page 4: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/4.jpg)
The process of GIS
One example in action…
![Page 5: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/5.jpg)
The process of GIS
![Page 6: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/6.jpg)
The process of GIS
One question that immediately comes to mind with this dataset is "just how many Ecocodes, Domains, Divisions, Provinces, and Sections are present in this map?" Fortunately, we can answer this with a simple SQL query.
![Page 7: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/7.jpg)
The process of GIS
Here is SQL that gives a table of names of the domains, along with area in km
![Page 8: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/8.jpg)
The process of GIS
Here is SQL that gives you a map of the domains
![Page 9: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/9.jpg)
The process of GIS
Here is SQL that gives a table of names of the divisions, along with area in km
![Page 10: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/10.jpg)
The process of GIS
Here is SQL that gives you a map of the divisions
![Page 11: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/11.jpg)
The process of GIS
Example, continued…
![Page 12: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/12.jpg)
Projects & Grading: Review
Short written assignments & quizzes (25%)Participation in lab, lecture & group project (25%)Individual project (50%)
Vector and raster dataWritten & Oral ReportsMust have dynamic web map component
![Page 13: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/13.jpg)
Group Projects
• Several layers: vector and/or raster • 3-4 data analysis components.• Basic web map with layers & layer selector.• Various assignments along the way
![Page 14: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/14.jpg)
Individual Projects
Most proposals are very ambitious– this is good!
Doing the following will get you 75%:• Several vector & at least one raster component (or vice versa) • 3-4 data analysis components.• Written report with static (print) maps. This will be in the style of literate
programming.• Basic web map with layers & layer selector.• Oral report (~7 minutes, last day of class)
Remaining 25%-- excel in one or more areas:• Data Analysis• Written Report• Static Maps• Web Map• Oral report
![Page 15: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/15.jpg)
Individual Projects
![Page 16: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/16.jpg)
Individual Projects
![Page 17: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/17.jpg)
Individual Projects
![Page 18: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/18.jpg)
Individual Projects
![Page 19: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/19.jpg)
Individual Projects
![Page 20: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/20.jpg)
Individual Projects
![Page 21: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/21.jpg)
Individual Projects
![Page 22: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/22.jpg)
Homework
22
Homework for Thursday• Sections 10-13, 18-19, Boundless PostGIS
Tutorial
http://workshops.boundlessgeo.com/postgis-intro/
![Page 23: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/23.jpg)
Homework
23
Homework: quick overview--demo
![Page 24: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/24.jpg)
Tip: Loading PostGIS layers in QGIS
24
I’ve found the DB Manager to work best (DatabaseDB Manager).
![Page 25: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/25.jpg)
Tip: Loading PostGIS layers in QGIS
25
I’ve found the DB Manager to work best (DatabaseDB Manager). • Click and drag layers to add to map. • SQL window is awesome...
![Page 26: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/26.jpg)
Tip: DB Manager SQL Window
26
DB Manager SQL window is awesome...
![Page 27: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/27.jpg)
Tip: DB Manager SQL Window
27
DB Manager SQL window is awesome...
![Page 28: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/28.jpg)
Tip: Getting PostGIS views to work in QGIS
28
This will not work in QGIS because QGIS requires a primary key
CREATE OR REPLACE VIEW orangeline ASSELECT nyc_subway_stations.geom, nyc_subway_stations.color, nyc_subway_stations.nameFROM nyc_subway_stationsWHERE nyc_subway_stations.color::text = 'ORANGE’
![Page 29: Literate Programming and the Process of GIS](https://reader035.vdocuments.site/reader035/viewer/2022062422/56813f52550346895daa0fe7/html5/thumbnails/29.jpg)
Tip: Getting PostGIS views to work in QGIS
29
Add the red highlighted code to make a fake primary key
CREATE OR REPLACE VIEW orangeline ASSELECT nyc_subway_stations.geom, nyc_subway_stations.color, nyc_subway_stations.name,
row_number() OVER() AS id_qgisFROM nyc_subway_stationsWHERE nyc_subway_stations.color::text = 'ORANGE’