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

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Recently uploaded (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

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?