SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
SQL For Everything
Geoprocessing and Cartography With
PostGIS

Bill Morris – Geosprocket LLC
Speedy Background
• SQL = Structured Query Language
• Beloved/BeHated by Database Admins
• Runs Behind Nearly Everything

SQL For Everything - Bill Morris - Geosprocket LLC
Ever Fired Up a Computer?
You’ve Used SQL.

SQL For Everything - Bill Morris - Geosprocket LLC
So What’s PostGIS?
• A spatial extender for the PostgreSQL
database system
• Free as in Speech, Free as in Beer

SQL For Everything - Bill Morris - Geosprocket LLC
What’s Post-PostGIS?
• A parody on Twitter. Pay no mind.

SQL For Everything - Bill Morris - Geosprocket LLC
What’s CartoDB?
• A PostGIS environment built for the web
• “Open-Source Fusion Tables”
• Build your own server:
https://github.com/CartoDB/cartodb20
• Or get a hosted account:
http://cartodb.com/

SQL For Everything - Bill Morris - Geosprocket LLC
SQL For Everything - Bill Morris - Geosprocket LLC
SQL For Everything - Bill Morris - Geosprocket LLC
Back to SQL.

SQL For Everything - Bill Morris - Geosprocket LLC
SQL as we know it

Source: Chicago Crime Commission & Openstreetmap Contributors
SQL For Everything - Bill Morris - Geosprocket LLC
SELECT * FROM territory_all WHERE
“NAME” LIKE ‘Latin%’

Source: Chicago Crime Commission & Openstreetmap Contributors
SQL For Everything - Bill Morris - Geosprocket LLC
SELECT * FROM territory_all WHERE
name LIKE ‘Latin%’

SQL For Everything - Bill Morris - Geosprocket LLC
Geoprocessing as we know it

SQL For Everything - Bill Morris - Geosprocket LLC
Geoprocessing in PostGIS

SELECT ST_Whatever( geoprocess! )

SQL For Everything - Bill Morris - Geosprocket LLC
Geoprocessing in PostGIS

SQL For Everything - Bill Morris - Geosprocket LLC
Buffer 500m

SQL For Everything - Bill Morris - Geosprocket LLC
Buffer 500m from the points that
fall on Ashland Ave

SQL For Everything - Bill Morris - Geosprocket LLC
Append two layers of different
geometry types

SQL For Everything - Bill Morris - Geosprocket LLC
Geoprocessing Optimized

…png?sql=…

SQL For Everything - Bill Morris - Geosprocket LLC
?

SQL For Everything - Bill Morris - Geosprocket LLC
This is Familiar

google.com?q=GIS

SQL For Everything - Bill Morris - Geosprocket LLC
…png?sql=…

SQL For Everything - Bill Morris - Geosprocket LLC
http://2.tiles.cartocdn.com/geosprocket/tiles/vtparcels_burlington2002b/15/9714/11850.png

SQL For Everything - Bill Morris - Geosprocket LLC
http://2.tiles.cartocdn.com/geosprocket/tiles/vtparcels_burlington2002b/15/9714/11850.png?sql
=SELECT * FROM vtparcels_burlington2002b WHERE area>8000

SQL For Everything - Bill Morris - Geosprocket LLC
http://2.tiles.cartocdn.com/geosprocket/tiles/vtparcels_burlington2002b/15/9714/11850.png?sql
=SELECT 20 as distance, st_buffer(the_geom_webmercator,50) as the_geom_webmercator FROM
vtparcels_burlington2002b WHERE area>80000

SQL For Everything - Bill Morris - Geosprocket LLC
Going off the Rails a Bit . . .

https://gist.github.com/wboykinm/5533575
SQL For Everything - Bill Morris - Geosprocket LLC
SQL For Everything - Bill Morris - Geosprocket LLC
A Query Turns This . . .

SQL For Everything - Bill Morris - Geosprocket LLC
Into This.

SQL For Everything - Bill Morris - Geosprocket LLC
I’m barely scratching the surface of SQL here.

https://gist.github.com/wboykinm/5533575
SQL For Everything - Bill Morris - Geosprocket LLC
Why Care?
Because the web wants to see
your data

SQL For Everything - Bill Morris - Geosprocket LLC
SQL For Everything - Bill Morris - Geosprocket LLC
SQL For Everything - Bill Morris - Geosprocket LLC
SQL For Everything - Bill Morris - Geosprocket LLC
SQL For Everything - Bill Morris - Geosprocket LLC
PostGIS

SQL For Everything - Bill Morris - Geosprocket LLC
Thanks! Accepting all questions:

wboykinm@geosprocket.com

@vtcraghead

SQL For Everything - Bill Morris - Geosprocket LLC

Weitere ähnliche Inhalte

Ähnlich wie Sql for Everything: GIS on the Web

How OLTP to OLAP Archival Demystified
How OLTP to OLAP Archival DemystifiedHow OLTP to OLAP Archival Demystified
How OLTP to OLAP Archival DemystifiedAlkin Tezuysal
 
Log files: The Overlooked Source of SEO Opportunities
Log files: The Overlooked Source of SEO OpportunitiesLog files: The Overlooked Source of SEO Opportunities
Log files: The Overlooked Source of SEO OpportunitiesRobin Rozhon
 
Enabling Microservices @Orbitz - Velocity Conf 2015
Enabling Microservices @Orbitz - Velocity Conf 2015Enabling Microservices @Orbitz - Velocity Conf 2015
Enabling Microservices @Orbitz - Velocity Conf 2015Steve Hoffman
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBMoshe Kaplan
 
GeoMesa on Apache Spark SQL with Anthony Fox
GeoMesa on Apache Spark SQL with Anthony FoxGeoMesa on Apache Spark SQL with Anthony Fox
GeoMesa on Apache Spark SQL with Anthony FoxDatabricks
 
Leveraging Collector & UtiliSync to Manage Utilities
Leveraging Collector & UtiliSync to Manage UtilitiesLeveraging Collector & UtiliSync to Manage Utilities
Leveraging Collector & UtiliSync to Manage UtilitiesMatthew Stayner
 
Make your website 2 times faster
Make your website 2 times fasterMake your website 2 times faster
Make your website 2 times fasterSatoshi Kikuchi
 
Where20 2008 Ruby Tutorial
Where20 2008 Ruby TutorialWhere20 2008 Ruby Tutorial
Where20 2008 Ruby TutorialShoaib Burq
 
User Camp High Availability Presentation
User Camp High Availability PresentationUser Camp High Availability Presentation
User Camp High Availability Presentationsankalita chakraborty
 
Building Intelligent bots using microsoft bot framework and cognitive service...
Building Intelligent bots using microsoft bot framework and cognitive service...Building Intelligent bots using microsoft bot framework and cognitive service...
Building Intelligent bots using microsoft bot framework and cognitive service...Prashant G Bhoyar (Microsoft MVP)
 
いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編
いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編
いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編Miho Yamamoto
 
Getting Started with PostGIS
Getting Started with PostGISGetting Started with PostGIS
Getting Started with PostGISEDB
 
超カジュアルに使うMySQL @ MySQL Casual Talks #2
超カジュアルに使うMySQL @ MySQL Casual Talks #2超カジュアルに使うMySQL @ MySQL Casual Talks #2
超カジュアルに使うMySQL @ MySQL Casual Talks #2Tasuku Suenaga
 
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015Enabling Microservices @Orbitz - DevOpsDays Chicago 2015
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015Steve Hoffman
 
WordCamp Columbus - Location Based Integrations
WordCamp Columbus - Location Based IntegrationsWordCamp Columbus - Location Based Integrations
WordCamp Columbus - Location Based Integrationslukepilon
 
Writing infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQLWriting infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQLGabriele Bartolini
 
Big Data Analytics with Google BigQuery, by Javier Ramirez, datawaki, at Span...
Big Data Analytics with Google BigQuery, by Javier Ramirez, datawaki, at Span...Big Data Analytics with Google BigQuery, by Javier Ramirez, datawaki, at Span...
Big Data Analytics with Google BigQuery, by Javier Ramirez, datawaki, at Span...javier ramirez
 

Ähnlich wie Sql for Everything: GIS on the Web (20)

How OLTP to OLAP Archival Demystified
How OLTP to OLAP Archival DemystifiedHow OLTP to OLAP Archival Demystified
How OLTP to OLAP Archival Demystified
 
Log files: The Overlooked Source of SEO Opportunities
Log files: The Overlooked Source of SEO OpportunitiesLog files: The Overlooked Source of SEO Opportunities
Log files: The Overlooked Source of SEO Opportunities
 
Enabling Microservices @Orbitz - Velocity Conf 2015
Enabling Microservices @Orbitz - Velocity Conf 2015Enabling Microservices @Orbitz - Velocity Conf 2015
Enabling Microservices @Orbitz - Velocity Conf 2015
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
GeoMesa on Apache Spark SQL with Anthony Fox
GeoMesa on Apache Spark SQL with Anthony FoxGeoMesa on Apache Spark SQL with Anthony Fox
GeoMesa on Apache Spark SQL with Anthony Fox
 
Leveraging Collector & UtiliSync to Manage Utilities
Leveraging Collector & UtiliSync to Manage UtilitiesLeveraging Collector & UtiliSync to Manage Utilities
Leveraging Collector & UtiliSync to Manage Utilities
 
Make your website 2 times faster
Make your website 2 times fasterMake your website 2 times faster
Make your website 2 times faster
 
Where20 2008 Ruby Tutorial
Where20 2008 Ruby TutorialWhere20 2008 Ruby Tutorial
Where20 2008 Ruby Tutorial
 
User Camp High Availability Presentation
User Camp High Availability PresentationUser Camp High Availability Presentation
User Camp High Availability Presentation
 
Building Intelligent bots using microsoft bot framework and cognitive service...
Building Intelligent bots using microsoft bot framework and cognitive service...Building Intelligent bots using microsoft bot framework and cognitive service...
Building Intelligent bots using microsoft bot framework and cognitive service...
 
いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編
いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編
いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編
 
Getting Started with PostGIS
Getting Started with PostGISGetting Started with PostGIS
Getting Started with PostGIS
 
超カジュアルに使うMySQL @ MySQL Casual Talks #2
超カジュアルに使うMySQL @ MySQL Casual Talks #2超カジュアルに使うMySQL @ MySQL Casual Talks #2
超カジュアルに使うMySQL @ MySQL Casual Talks #2
 
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015Enabling Microservices @Orbitz - DevOpsDays Chicago 2015
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015
 
Curso de MySQL 5.7
Curso de MySQL 5.7Curso de MySQL 5.7
Curso de MySQL 5.7
 
WordCamp Columbus - Location Based Integrations
WordCamp Columbus - Location Based IntegrationsWordCamp Columbus - Location Based Integrations
WordCamp Columbus - Location Based Integrations
 
Writing infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQLWriting infinite scalability web applications with PHP and PostgreSQL
Writing infinite scalability web applications with PHP and PostgreSQL
 
Big Data Analytics with Google BigQuery, by Javier Ramirez, datawaki, at Span...
Big Data Analytics with Google BigQuery, by Javier Ramirez, datawaki, at Span...Big Data Analytics with Google BigQuery, by Javier Ramirez, datawaki, at Span...
Big Data Analytics with Google BigQuery, by Javier Ramirez, datawaki, at Span...
 
GeoMesa on Spark SQL: Extracting Location Intelligence from Data
GeoMesa on Spark SQL: Extracting Location Intelligence from DataGeoMesa on Spark SQL: Extracting Location Intelligence from Data
GeoMesa on Spark SQL: Extracting Location Intelligence from Data
 
CakePHP + PostgreSQL
CakePHP + PostgreSQLCakePHP + PostgreSQL
CakePHP + PostgreSQL
 

Kürzlich hochgeladen

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Kürzlich hochgeladen (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Sql for Everything: GIS on the Web