SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
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

Más contenido relacionado

Similar a Sql for Everything: GIS on the Web

超カジュアルに使うMySQL @ MySQL Casual Talks #2
超カジュアルに使うMySQL @ MySQL Casual Talks #2超カジュアルに使うMySQL @ MySQL Casual Talks #2
超カジュアルに使うMySQL @ MySQL Casual Talks #2
Tasuku Suenaga
 
WordCamp Columbus - Location Based Integrations
WordCamp Columbus - Location Based IntegrationsWordCamp Columbus - Location Based Integrations
WordCamp Columbus - Location Based Integrations
lukepilon
 

Similar a 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
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Sql for Everything: GIS on the Web