SlideShare a Scribd company logo
1 of 20
Download to read offline
1 Media Production Support
v1 26 October2011
Blake Crosby
October 25, 2011
Introduction to GIS
2 Media Production Support
v1 26 October2011
What is GIS?
Geographic Information System is the merging
of cartography, statistical analysis,
and database technology.
3 Media Production Support
v1 26 October2011
Earliest Use
• John Snow, MD
was the man.
• Discovered the
cause of a cholera
outbreak in the UK
in 1854.
• Revolutionized
epidemiology.
4 Media Production Support
v1 26 October2011
Basic Principals
• Three key items:
– Reliable data source (database)
– A way to query your data (statistical analysis)
– A way to display your result (cartography)
• We’ll Cover:
– Spatial object types (of the vector kind)
– Geography 101 (the Earth is not round!)
– The power of a spatially aware database
– Displaying the end results to users.
5 Media Production Support
v1 26 October2011
Basic Vector Spatial Object Types
• A Point
– (-75.6692 45.3225)
• A Line String
– (-75.99 36.89,-74.16 38.78,-73.36 39.97,-72.86 40.10)
• A Polygon
– ((-75.99 36.89,-74.16 38.78,-73.36 39.97,-72.86 40.10,-75.99 36.89))
6 Media Production Support
v1 26 October2011
Cartesian what?
• What is the shortest distance between two points?
A Straight Line
7 Media Production Support
v1 26 October2011
Spherical Trig? Ugh!
• What is the shortest distance between two points on a
sphere?
A Geodesic Path
(aka: Great Circle)
8 Media Production Support
v1 26 October2011
What do you mean it’s not round?
• The Earth:
– Is not flat (thank you Pythagoras!)
– Is not round (eh?)
– Is actually an ellipsoid
Sphere
Spheroid
(Ellipsoid)
It is important to know this distinction!
9 Media Production Support
v1 26 October2011
So who cares? Sphere Vs. Ellipsoid
• What’s the distance between Ottawa and Amsterdam?
• If the Earth was a perfect sphere:
– 5,631.441 KM
• Using the WGS84 Geoid
– 5,648.054 KM
• A difference of 17 KM!
10 Media Production Support
v1 26 October2011
Geoids: Everything there is to know.
• Over 4000 “definitions” for the earth.
• Most common is WGS84 (Latitude / Longitude)
• Second most common is UTM (Meters)
• Some items to think about:
– If your source data is in UTM, how do you plan on converting to WGS84?
– Can your libraries support calculating “real world distances” (meters/kilometers)
from hours, minutes, and seconds (latitude/longitude)?
11 Media Production Support
v1 26 October2011
The $1,000,000 question
• How do you plan on answering these questions?
– Give me all the news stories within 10km of my current location.
– Will the forest fire in this story burn down my house?
– I want to know all the news events that affects the “Oakwood” Neighbourhood
• Javascript?
• PHP? Java?
• Spatially aware DB + SQL?
12 Media Production Support
v1 26 October2011
Javascript Stylez: News stories within 10 KMs?
• Doesn’t scale well.
– Calculating distances for 10 points is fast, but for 100? 1000? 10000?
• Not particularly fast (especially on mobile devices)
• How do you handle other objects (like polygons?)
var R = 6371; // km
var dLat = (lat2-lat1).toRad();
var dLon = (lon2-lon1).toRad();
var lat1 = lat1.toRad();
var lat2 = lat2.toRad();
var a = Math.sin(dLat/2) * Math.sin(dLat/2) +
Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
var d = R * c;
13 Media Production Support
v1 26 October2011
SQL Stylez: News stories within 10 KMs?
• Scales well
– Using bounding boxes and spatial indexes to eliminate points
• Fast!
– Runs on the server side
• Need a spatially aware database backend (such as
PostGIS)
SELECT storyid FROM storytable WHERE
st_within(userlocation,st_buffer(location,10000));
14 Media Production Support
v1 26 October2011
That’s great! But how do I show data to my users?
• Google Maps API
– Most popular.
– Easy to use functions
– Moderately Customizable
• OpenLayers
– Completely customizable
– No license restrictions
– 100% Pure JS library
15 Media Production Support
v1 26 October2011
I don’t like my base map.
• Do you want your base map to look like this:
• No control over look & feel
• At the “mercy” of Google
16 Media Production Support
v1 26 October2011
I don’t like my base map.
• Or like one of these:
• Complete control
• Data may be out of date
(crowd sourced)
17 Media Production Support
v1 26 October2011
OL vs. GM
Feature Google Maps Open Layers
Customizable Base Map? 4 predefined ones
(Unlimited in V3 API)
Unlimited
Map Controls Fully Customizable Fully Customizable
Mobile Compatible? Yes No
Data Sources KML only KML, Mapserver, GML,
WKT.
Spatial Functions? Yes (a few) Yes (a lot)
Learning Curve Medium Steep
Reprojection? No (everything must
be in lat/long)
Yes
18 Media Production Support
v1 26 October2011
“Ultimate” Solution/Technologies
• Custom Base Map
– Data: Open Street Map
– Renderer: Mapnik+Tile Cache
• Datastore
– PostgreSQL+PostGIS
• Google Map API
– PHP backend serving it data via JSON
19 Media Production Support
v1 26 October2011
“Probable” Solution/Technologies
• Datastore
– PostgreSQL
– Lat/Lon stored as int in database
• Google Map API
– PHP backend serving it data via JSON
20 Media Production Support
v1 26 October2011
Questions We Need to Answer
• How are we going to geo-tagging news stories?
• How are we going to store UGC?
• What spatial questions is the application going to answer?
• Is the primary interface a map?
• Do we need to overlay only points? Or polygons as well?

More Related Content

Similar to Intro to GIS

Visualizing (BIG) data.
Visualizing (BIG) data.Visualizing (BIG) data.
Visualizing (BIG) data.Jameson Toole
 
BigDataEurope 1st SC5 Workshop, Project Teleios & LEO, by M. Koubarakis, Univ...
BigDataEurope 1st SC5 Workshop, Project Teleios & LEO, by M. Koubarakis, Univ...BigDataEurope 1st SC5 Workshop, Project Teleios & LEO, by M. Koubarakis, Univ...
BigDataEurope 1st SC5 Workshop, Project Teleios & LEO, by M. Koubarakis, Univ...BigData_Europe
 
Os open data masterclass november 2013 v3.1
Os open data masterclass november 2013 v3.1Os open data masterclass november 2013 v3.1
Os open data masterclass november 2013 v3.1Luke Hampson
 
GRASS GIS, Star Trek and old Video Tape – a reference case on audiovisual pre...
GRASS GIS, Star Trek and old Video Tape – a reference case on audiovisual pre...GRASS GIS, Star Trek and old Video Tape – a reference case on audiovisual pre...
GRASS GIS, Star Trek and old Video Tape – a reference case on audiovisual pre...Peter Löwe
 
DSD-INT 2016 A crowd-sourced spatial database can change the way we work - Va...
DSD-INT 2016 A crowd-sourced spatial database can change the way we work - Va...DSD-INT 2016 A crowd-sourced spatial database can change the way we work - Va...
DSD-INT 2016 A crowd-sourced spatial database can change the way we work - Va...Deltares
 
Global Soil Data Task, part of Earth Data Sets - Vincent van Engelen
Global Soil Data Task, part of Earth Data Sets - Vincent van EngelenGlobal Soil Data Task, part of Earth Data Sets - Vincent van Engelen
Global Soil Data Task, part of Earth Data Sets - Vincent van EngelenFAO
 
IGIS Workshop - Introduction to ArcGIS Pro - Apr 2022 - Presentation.pdf
IGIS Workshop - Introduction to ArcGIS Pro - Apr 2022 - Presentation.pdfIGIS Workshop - Introduction to ArcGIS Pro - Apr 2022 - Presentation.pdf
IGIS Workshop - Introduction to ArcGIS Pro - Apr 2022 - Presentation.pdfnoureddinebassa1
 
CensusGIV - Geographic Information Visualisation of Census Data
CensusGIV - Geographic Information Visualisation of Census DataCensusGIV - Geographic Information Visualisation of Census Data
CensusGIV - Geographic Information Visualisation of Census DataCASA, UCL
 
DSD-INT 2016 OpenEarth components in Data Science, some examples - Hendriksen
DSD-INT 2016 OpenEarth components in Data Science, some examples - HendriksenDSD-INT 2016 OpenEarth components in Data Science, some examples - Hendriksen
DSD-INT 2016 OpenEarth components in Data Science, some examples - HendriksenDeltares
 
GIS on the Web
GIS on the WebGIS on the Web
GIS on the WebRuss White
 
Augmented reality @ libraries
Augmented reality @ librariesAugmented reality @ libraries
Augmented reality @ librariesKai Li
 
Joy Mountford at BayCHI: Visualizations of Our Collective Lives
Joy Mountford at BayCHI: Visualizations of Our Collective LivesJoy Mountford at BayCHI: Visualizations of Our Collective Lives
Joy Mountford at BayCHI: Visualizations of Our Collective LivesBayCHI
 
Come with an idea - go home with a web map: Tools for sharing maps and vector...
Come with an idea - go home with a web map: Tools for sharing maps and vector...Come with an idea - go home with a web map: Tools for sharing maps and vector...
Come with an idea - go home with a web map: Tools for sharing maps and vector...Stefan Keller
 
Visualizing 4G experience by country, across networks, OpenSignal
Visualizing 4G experience by country, across networks, OpenSignal Visualizing 4G experience by country, across networks, OpenSignal
Visualizing 4G experience by country, across networks, OpenSignal Internet World
 
WORLDMAP: A SPATIAL INFRASTRUCTURE TO SUPPORT TEACHING AND RESEARCH (BROWN BA...
WORLDMAP: A SPATIAL INFRASTRUCTURE TO SUPPORT TEACHING AND RESEARCH (BROWN BA...WORLDMAP: A SPATIAL INFRASTRUCTURE TO SUPPORT TEACHING AND RESEARCH (BROWN BA...
WORLDMAP: A SPATIAL INFRASTRUCTURE TO SUPPORT TEACHING AND RESEARCH (BROWN BA...Micah Altman
 
Applying data visualisation to the analytics process
Applying data visualisation to the analytics processApplying data visualisation to the analytics process
Applying data visualisation to the analytics processCasper Blicher Olsen
 

Similar to Intro to GIS (20)

Visualizing (BIG) data.
Visualizing (BIG) data.Visualizing (BIG) data.
Visualizing (BIG) data.
 
BigDataEurope 1st SC5 Workshop, Project Teleios & LEO, by M. Koubarakis, Univ...
BigDataEurope 1st SC5 Workshop, Project Teleios & LEO, by M. Koubarakis, Univ...BigDataEurope 1st SC5 Workshop, Project Teleios & LEO, by M. Koubarakis, Univ...
BigDataEurope 1st SC5 Workshop, Project Teleios & LEO, by M. Koubarakis, Univ...
 
Os open data masterclass november 2013 v3.1
Os open data masterclass november 2013 v3.1Os open data masterclass november 2013 v3.1
Os open data masterclass november 2013 v3.1
 
GRASS GIS, Star Trek and old Video Tape – a reference case on audiovisual pre...
GRASS GIS, Star Trek and old Video Tape – a reference case on audiovisual pre...GRASS GIS, Star Trek and old Video Tape – a reference case on audiovisual pre...
GRASS GIS, Star Trek and old Video Tape – a reference case on audiovisual pre...
 
GWT Plus HTML 5
GWT Plus HTML 5GWT Plus HTML 5
GWT Plus HTML 5
 
DSD-INT 2016 A crowd-sourced spatial database can change the way we work - Va...
DSD-INT 2016 A crowd-sourced spatial database can change the way we work - Va...DSD-INT 2016 A crowd-sourced spatial database can change the way we work - Va...
DSD-INT 2016 A crowd-sourced spatial database can change the way we work - Va...
 
Global Soil Data Task, part of Earth Data Sets - Vincent van Engelen
Global Soil Data Task, part of Earth Data Sets - Vincent van EngelenGlobal Soil Data Task, part of Earth Data Sets - Vincent van Engelen
Global Soil Data Task, part of Earth Data Sets - Vincent van Engelen
 
IGIS Workshop - Introduction to ArcGIS Pro - Apr 2022 - Presentation.pdf
IGIS Workshop - Introduction to ArcGIS Pro - Apr 2022 - Presentation.pdfIGIS Workshop - Introduction to ArcGIS Pro - Apr 2022 - Presentation.pdf
IGIS Workshop - Introduction to ArcGIS Pro - Apr 2022 - Presentation.pdf
 
CensusGIV - Geographic Information Visualisation of Census Data
CensusGIV - Geographic Information Visualisation of Census DataCensusGIV - Geographic Information Visualisation of Census Data
CensusGIV - Geographic Information Visualisation of Census Data
 
Vision for the OpenQuake Platform [Sep 2012]
Vision for the OpenQuake Platform [Sep 2012]Vision for the OpenQuake Platform [Sep 2012]
Vision for the OpenQuake Platform [Sep 2012]
 
Big Data
Big DataBig Data
Big Data
 
DSD-INT 2016 OpenEarth components in Data Science, some examples - Hendriksen
DSD-INT 2016 OpenEarth components in Data Science, some examples - HendriksenDSD-INT 2016 OpenEarth components in Data Science, some examples - Hendriksen
DSD-INT 2016 OpenEarth components in Data Science, some examples - Hendriksen
 
GIS on the Web
GIS on the WebGIS on the Web
GIS on the Web
 
Augmented reality @ libraries
Augmented reality @ librariesAugmented reality @ libraries
Augmented reality @ libraries
 
Joy Mountford at BayCHI: Visualizations of Our Collective Lives
Joy Mountford at BayCHI: Visualizations of Our Collective LivesJoy Mountford at BayCHI: Visualizations of Our Collective Lives
Joy Mountford at BayCHI: Visualizations of Our Collective Lives
 
Come with an idea - go home with a web map: Tools for sharing maps and vector...
Come with an idea - go home with a web map: Tools for sharing maps and vector...Come with an idea - go home with a web map: Tools for sharing maps and vector...
Come with an idea - go home with a web map: Tools for sharing maps and vector...
 
Visualizing 4G experience by country, across networks, OpenSignal
Visualizing 4G experience by country, across networks, OpenSignal Visualizing 4G experience by country, across networks, OpenSignal
Visualizing 4G experience by country, across networks, OpenSignal
 
1 mapreduce-fest
1 mapreduce-fest1 mapreduce-fest
1 mapreduce-fest
 
WORLDMAP: A SPATIAL INFRASTRUCTURE TO SUPPORT TEACHING AND RESEARCH (BROWN BA...
WORLDMAP: A SPATIAL INFRASTRUCTURE TO SUPPORT TEACHING AND RESEARCH (BROWN BA...WORLDMAP: A SPATIAL INFRASTRUCTURE TO SUPPORT TEACHING AND RESEARCH (BROWN BA...
WORLDMAP: A SPATIAL INFRASTRUCTURE TO SUPPORT TEACHING AND RESEARCH (BROWN BA...
 
Applying data visualisation to the analytics process
Applying data visualisation to the analytics processApplying data visualisation to the analytics process
Applying data visualisation to the analytics process
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Intro to GIS

  • 1. 1 Media Production Support v1 26 October2011 Blake Crosby October 25, 2011 Introduction to GIS
  • 2. 2 Media Production Support v1 26 October2011 What is GIS? Geographic Information System is the merging of cartography, statistical analysis, and database technology.
  • 3. 3 Media Production Support v1 26 October2011 Earliest Use • John Snow, MD was the man. • Discovered the cause of a cholera outbreak in the UK in 1854. • Revolutionized epidemiology.
  • 4. 4 Media Production Support v1 26 October2011 Basic Principals • Three key items: – Reliable data source (database) – A way to query your data (statistical analysis) – A way to display your result (cartography) • We’ll Cover: – Spatial object types (of the vector kind) – Geography 101 (the Earth is not round!) – The power of a spatially aware database – Displaying the end results to users.
  • 5. 5 Media Production Support v1 26 October2011 Basic Vector Spatial Object Types • A Point – (-75.6692 45.3225) • A Line String – (-75.99 36.89,-74.16 38.78,-73.36 39.97,-72.86 40.10) • A Polygon – ((-75.99 36.89,-74.16 38.78,-73.36 39.97,-72.86 40.10,-75.99 36.89))
  • 6. 6 Media Production Support v1 26 October2011 Cartesian what? • What is the shortest distance between two points? A Straight Line
  • 7. 7 Media Production Support v1 26 October2011 Spherical Trig? Ugh! • What is the shortest distance between two points on a sphere? A Geodesic Path (aka: Great Circle)
  • 8. 8 Media Production Support v1 26 October2011 What do you mean it’s not round? • The Earth: – Is not flat (thank you Pythagoras!) – Is not round (eh?) – Is actually an ellipsoid Sphere Spheroid (Ellipsoid) It is important to know this distinction!
  • 9. 9 Media Production Support v1 26 October2011 So who cares? Sphere Vs. Ellipsoid • What’s the distance between Ottawa and Amsterdam? • If the Earth was a perfect sphere: – 5,631.441 KM • Using the WGS84 Geoid – 5,648.054 KM • A difference of 17 KM!
  • 10. 10 Media Production Support v1 26 October2011 Geoids: Everything there is to know. • Over 4000 “definitions” for the earth. • Most common is WGS84 (Latitude / Longitude) • Second most common is UTM (Meters) • Some items to think about: – If your source data is in UTM, how do you plan on converting to WGS84? – Can your libraries support calculating “real world distances” (meters/kilometers) from hours, minutes, and seconds (latitude/longitude)?
  • 11. 11 Media Production Support v1 26 October2011 The $1,000,000 question • How do you plan on answering these questions? – Give me all the news stories within 10km of my current location. – Will the forest fire in this story burn down my house? – I want to know all the news events that affects the “Oakwood” Neighbourhood • Javascript? • PHP? Java? • Spatially aware DB + SQL?
  • 12. 12 Media Production Support v1 26 October2011 Javascript Stylez: News stories within 10 KMs? • Doesn’t scale well. – Calculating distances for 10 points is fast, but for 100? 1000? 10000? • Not particularly fast (especially on mobile devices) • How do you handle other objects (like polygons?) var R = 6371; // km var dLat = (lat2-lat1).toRad(); var dLon = (lon2-lon1).toRad(); var lat1 = lat1.toRad(); var lat2 = lat2.toRad(); var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); var d = R * c;
  • 13. 13 Media Production Support v1 26 October2011 SQL Stylez: News stories within 10 KMs? • Scales well – Using bounding boxes and spatial indexes to eliminate points • Fast! – Runs on the server side • Need a spatially aware database backend (such as PostGIS) SELECT storyid FROM storytable WHERE st_within(userlocation,st_buffer(location,10000));
  • 14. 14 Media Production Support v1 26 October2011 That’s great! But how do I show data to my users? • Google Maps API – Most popular. – Easy to use functions – Moderately Customizable • OpenLayers – Completely customizable – No license restrictions – 100% Pure JS library
  • 15. 15 Media Production Support v1 26 October2011 I don’t like my base map. • Do you want your base map to look like this: • No control over look & feel • At the “mercy” of Google
  • 16. 16 Media Production Support v1 26 October2011 I don’t like my base map. • Or like one of these: • Complete control • Data may be out of date (crowd sourced)
  • 17. 17 Media Production Support v1 26 October2011 OL vs. GM Feature Google Maps Open Layers Customizable Base Map? 4 predefined ones (Unlimited in V3 API) Unlimited Map Controls Fully Customizable Fully Customizable Mobile Compatible? Yes No Data Sources KML only KML, Mapserver, GML, WKT. Spatial Functions? Yes (a few) Yes (a lot) Learning Curve Medium Steep Reprojection? No (everything must be in lat/long) Yes
  • 18. 18 Media Production Support v1 26 October2011 “Ultimate” Solution/Technologies • Custom Base Map – Data: Open Street Map – Renderer: Mapnik+Tile Cache • Datastore – PostgreSQL+PostGIS • Google Map API – PHP backend serving it data via JSON
  • 19. 19 Media Production Support v1 26 October2011 “Probable” Solution/Technologies • Datastore – PostgreSQL – Lat/Lon stored as int in database • Google Map API – PHP backend serving it data via JSON
  • 20. 20 Media Production Support v1 26 October2011 Questions We Need to Answer • How are we going to geo-tagging news stories? • How are we going to store UGC? • What spatial questions is the application going to answer? • Is the primary interface a map? • Do we need to overlay only points? Or polygons as well?