SlideShare a Scribd company logo
Why is PostGIS awesome?
Reason 1: it is open source
Kasper Van Lombeek - Forespell.com
17 / 11 / 2016 - DS Meetup Antwerp
First we need to understand:
Why did SQL need an extension?
Problem 1: data storage
Try to store this rectangle in a db
A db that allows only atomic data
points.
P1 P2
P3P4
Lets tryPid X Y
P1 0 0
P2 0 1
P3 1 1
P4 1 0
Table 1: points
Eid Pid
E1 P1
E1 P2
E2 P2
E2
…
P3
…
Table 3: Starts_or_ends
Eid Length
E1 1
E2 1
E3 1
E4 1
Table 2: Edges
P1 P2
P3P4
E1
E2
E3
E4
Rid Eid
R1 E1
R1 E2
R1 E3
R1
…
E4
…
Table 4: Boundary
Rid Rname
R1 UnitSquare
Table 5: Rectangle
Lets try storing all the neighbourhoods
in Belgium?
Solution: SQL 3 custom spatial data types
PostGIS follows the Simple Features for SQL specification from the Open Geospatial
Consortium (OGC).
Problem 2: querying the
database
How to query our db?
Describe in words how to query the
points within the rectangle.
What about a more complex shape?
Would your query still work?
Solution: spatial operators
Provided by GEOS - Geometry Engine, Open Source
Problem 3: querying the
database fast
In which area do we have most
bicycle thefts?
Need for an index
Solution: spatial index
R-tree implementation of bounding boxes of geometries
These three solutions are integrated
in PostGIS
- Geometry types for Points, LineStrings, Polygons, MultiPoints, MultiLineStrings, MultipPolygons and
GeometryCollections.
- Spatial predicates for determining the interactions of geometries using the 3x3 DE-9IM (provided by the GEOS
software library).
- Spatial operators for determining geospatial measurements like area, distance, length and perimeter.
- Spatial operators for determining geospatial set operations, like union, difference, symmetric difference and
buffers (provided by GEOS).
- R-tree-over-GiST (Generalized Search Tree) spatial indexes for high speed spatial querying.
- Index selectivity support, to provide high performance query plans for mixed spatial/non-spatial queries.
- For raster data, PostGIS WKT Raster (now integrated into PostGIS 2.0+ and renamed PostGIS Raster)
- The PostGIS implementation is based on "light-weight" geometries and indexes optimized to reduce disk and
memory footprint. Using light-weight geometries helps servers increase the amount of data migrated up from
physical disk storage into RAM, improving query performance substantially.
- PostGIS is registered as "implements the specified standard" for "Simple Features for SQL" by the OGC.[2]
PostGIS has not been certified as compliant by the OGC. For the OGC's definition of compliant, see What does
"Compliant" mean?.
Source: wikipedia
Demo in IPython notebook

More Related Content

PPTX
PostGIS and Spatial SQL
Todd Barr
 
ODP
Intro To PostGIS
mleslie
 
ODP
Introduction To PostGIS
mleslie
 
PPTX
Day 6 - PostGIS
Barry Jones
 
PPTX
FOSS4G 2017 Spatial Sql for Rookies
Todd Barr
 
ODP
WMS Performance Shootout 2010
Jeff McKenna
 
ODP
WMS Performance Shootout 2009
Jeff McKenna
 
PPTX
Spatiotemporal Raster Improvements in GeoServer
GeoSolutions
 
PostGIS and Spatial SQL
Todd Barr
 
Intro To PostGIS
mleslie
 
Introduction To PostGIS
mleslie
 
Day 6 - PostGIS
Barry Jones
 
FOSS4G 2017 Spatial Sql for Rookies
Todd Barr
 
WMS Performance Shootout 2010
Jeff McKenna
 
WMS Performance Shootout 2009
Jeff McKenna
 
Spatiotemporal Raster Improvements in GeoServer
GeoSolutions
 

What's hot (20)

ODP
WMS Performance Shootout 2011
Jeff McKenna
 
PPT
Wms Performance Tests Map Server Vs Geo Server
DonnyV
 
PDF
GeoServer on Steroids at FOSS4G Europe 2014
GeoSolutions
 
PDF
Using GeoServer for spatio-temporal data management with examples for MetOc a...
GeoSolutions
 
PPTX
Crunching Data In GeoServer: Mastering Rendering Transformations, WPS Process...
GeoSolutions
 
PPT
Overview of MassGIS Web Mapping Services
aleda_freeman
 
PDF
Spatial functions in MySQL 5.6, MariaDB 5.5, PostGIS 2.0 and others
Henrik Ingo
 
PPTX
GeoServer in Production: we do it, here is how!
GeoSolutions
 
PPT
HDF5 Performance Enhancements with the Elimination of Unlimited Dimension
The HDF-EOS Tools and Information Center
 
PPTX
MySQL 5.7 GIS
Pavan Naik
 
ODP
MapServer #ProTips 2015
Jeff McKenna
 
PDF
State of GeoServer - FOSS4G 2016
GeoSolutions
 
PDF
Enterprise class deployment for GeoServer and GeoWebcache Optimizing perform...
GeoSolutions
 
PPTX
Big size meteorological data processing and mobile displaying system using ...
BJ Jang
 
PDF
GeoServer on steroids
GeoSolutions
 
PDF
OSM data in MariaDB / MySQL - All the world in a few large tables
hholzgra
 
PDF
GeoServer, an introduction for beginners
GeoSolutions
 
PDF
Processing Geospatial at Scale at LocationTech
Rob Emanuele
 
PDF
Spatio-temporal Data Handling With GeoServer for MetOc And Remote Sensing
GeoSolutions
 
PDF
GeoServer on Steroids
GeoSolutions
 
WMS Performance Shootout 2011
Jeff McKenna
 
Wms Performance Tests Map Server Vs Geo Server
DonnyV
 
GeoServer on Steroids at FOSS4G Europe 2014
GeoSolutions
 
Using GeoServer for spatio-temporal data management with examples for MetOc a...
GeoSolutions
 
Crunching Data In GeoServer: Mastering Rendering Transformations, WPS Process...
GeoSolutions
 
Overview of MassGIS Web Mapping Services
aleda_freeman
 
Spatial functions in MySQL 5.6, MariaDB 5.5, PostGIS 2.0 and others
Henrik Ingo
 
GeoServer in Production: we do it, here is how!
GeoSolutions
 
HDF5 Performance Enhancements with the Elimination of Unlimited Dimension
The HDF-EOS Tools and Information Center
 
MySQL 5.7 GIS
Pavan Naik
 
MapServer #ProTips 2015
Jeff McKenna
 
State of GeoServer - FOSS4G 2016
GeoSolutions
 
Enterprise class deployment for GeoServer and GeoWebcache Optimizing perform...
GeoSolutions
 
Big size meteorological data processing and mobile displaying system using ...
BJ Jang
 
GeoServer on steroids
GeoSolutions
 
OSM data in MariaDB / MySQL - All the world in a few large tables
hholzgra
 
GeoServer, an introduction for beginners
GeoSolutions
 
Processing Geospatial at Scale at LocationTech
Rob Emanuele
 
Spatio-temporal Data Handling With GeoServer for MetOc And Remote Sensing
GeoSolutions
 
GeoServer on Steroids
GeoSolutions
 
Ad

Viewers also liked (12)

PDF
Postgis for Enterprise
GeoLivre Conference
 
PPT
Using PostGIS in Local Government (Enterprise)
Dave Michelson
 
PDF
Beyond Postgres: Interesting Projects, Tools and forks
Sameer Kumar
 
PDF
Introduction of Open Source GIS
SANGHEE SHIN
 
PDF
Sistemas de Información Geográfica Libres - Flisol 2016
Plattinux
 
PDF
Quoi de neuf dans post gis 2.0 le raster bien sur mais beaucoup plus
VisionGÉOMATIQUE2012
 
PDF
QGIS et WebSIG(s), la convergence ?
Camptocamp
 
PPTX
Performance and Application of GIS and Big Data ETL Processes Using FME
Safe Software
 
PDF
State of GeoServer 2.10
Jody Garnett
 
PDF
SIG open source : aperçu et comparaisons - présentation AGMQ 30 avril 2009
Mathieu Lahaye
 
ODP
OpenLayers vs. Leaflet
dasjo
 
PDF
Use Case: PostGIS and Agribotics
PGConf APAC
 
Postgis for Enterprise
GeoLivre Conference
 
Using PostGIS in Local Government (Enterprise)
Dave Michelson
 
Beyond Postgres: Interesting Projects, Tools and forks
Sameer Kumar
 
Introduction of Open Source GIS
SANGHEE SHIN
 
Sistemas de Información Geográfica Libres - Flisol 2016
Plattinux
 
Quoi de neuf dans post gis 2.0 le raster bien sur mais beaucoup plus
VisionGÉOMATIQUE2012
 
QGIS et WebSIG(s), la convergence ?
Camptocamp
 
Performance and Application of GIS and Big Data ETL Processes Using FME
Safe Software
 
State of GeoServer 2.10
Jody Garnett
 
SIG open source : aperçu et comparaisons - présentation AGMQ 30 avril 2009
Mathieu Lahaye
 
OpenLayers vs. Leaflet
dasjo
 
Use Case: PostGIS and Agribotics
PGConf APAC
 
Ad

Similar to Why is postgis awesome? (20)

PDF
Post gispguk
lbtlsystems
 
PPT
Building a Spatial Database in PostgreSQL
Sohail Akbar Goheer
 
PDF
Building Location Aware Apps - Get Started with PostGIS, PART I
lasmasi
 
PDF
Pg intro part1-theory_slides
lasmasi
 
PDF
Building A Spatial Database In Postgresql (Ppt).pdf
ssuser0ab1a4
 
PDF
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
GIS in the Rockies
 
PPT
Building a Spatial Database in PostgreSQL
Kudos S.A.S
 
PPT
Getting Started with PostGIS geographic database - Lasma Sietinsone, EDINA
JISC GECO
 
PPT
Getting started with PostGIS geographic database
EDINA, University of Edinburgh
 
PDF
Leicester 2010 notes
Joanne Cook
 
PPT
Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
ACSG Section Montréal
 
PDF
Integrating PostGIS in Web Applications
Command Prompt., Inc
 
PDF
Getting Started with PostGIS
EDB
 
PDF
Discover PostGIS: Add Spatial functions to PostgreSQL
EDB
 
PPT
Open Source Databases And Gis
Kudos S.A.S
 
PDF
Osgis 2010 notes
Joanne Cook
 
PPT
Using PostGIS To Add Some Spatial Flavor To Your Application
Steven Pousty
 
PDF
Adelaide Ruby Meetup PostGIS Notes
chris-teague
 
PDF
20210301_PGconf_Online_GPU_PostGIS_GiST_Index
Kohei KaiGai
 
PPT
Open Source GIS
Joe Larson
 
Post gispguk
lbtlsystems
 
Building a Spatial Database in PostgreSQL
Sohail Akbar Goheer
 
Building Location Aware Apps - Get Started with PostGIS, PART I
lasmasi
 
Pg intro part1-theory_slides
lasmasi
 
Building A Spatial Database In Postgresql (Ppt).pdf
ssuser0ab1a4
 
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
GIS in the Rockies
 
Building a Spatial Database in PostgreSQL
Kudos S.A.S
 
Getting Started with PostGIS geographic database - Lasma Sietinsone, EDINA
JISC GECO
 
Getting started with PostGIS geographic database
EDINA, University of Edinburgh
 
Leicester 2010 notes
Joanne Cook
 
Stockage, manipulation et analyse de données matricielles avec PostGIS Raster
ACSG Section Montréal
 
Integrating PostGIS in Web Applications
Command Prompt., Inc
 
Getting Started with PostGIS
EDB
 
Discover PostGIS: Add Spatial functions to PostgreSQL
EDB
 
Open Source Databases And Gis
Kudos S.A.S
 
Osgis 2010 notes
Joanne Cook
 
Using PostGIS To Add Some Spatial Flavor To Your Application
Steven Pousty
 
Adelaide Ruby Meetup PostGIS Notes
chris-teague
 
20210301_PGconf_Online_GPU_PostGIS_GiST_Index
Kohei KaiGai
 
Open Source GIS
Joe Larson
 

Recently uploaded (20)

PPTX
Data-Users-in-Database-Management-Systems (1).pptx
dharmik832021
 
PDF
SUMMER INTERNSHIP REPORT[1] (AutoRecovered) (6) (1).pdf
pandeydiksha814
 
PPTX
Future_of_AI_Presentation for everyone.pptx
boranamanju07
 
PPTX
Blue and Dark Blue Modern Technology Presentation.pptx
ap177979
 
PPTX
Introduction to Biostatistics Presentation.pptx
AtemJoshua
 
PPTX
HSE WEEKLY REPORT for dummies and lazzzzy.pptx
ahmedibrahim691723
 
PPTX
INFO8116 -Big data architecture and analytics
guddipatel10
 
PDF
Blue Futuristic Cyber Security Presentation.pdf
tanvikhunt1003
 
PPTX
Introduction-to-Python-Programming-Language (1).pptx
dhyeysapariya
 
PPTX
short term project on AI Driven Data Analytics
JMJCollegeComputerde
 
PPTX
IP_Journal_Articles_2025IP_Journal_Articles_2025
mishell212144
 
PPTX
World-population.pptx fire bunberbpeople
umutunsalnsl4402
 
PPTX
Probability systematic sampling methods.pptx
PrakashRajput19
 
PPTX
The whitetiger novel review for collegeassignment.pptx
DhruvPatel754154
 
PDF
Technical Writing Module-I Complete Notes.pdf
VedprakashArya13
 
PPTX
Presentation on animal welfare a good topic
kidscream385
 
PPTX
White Blue Simple Modern Enhancing Sales Strategy Presentation_20250724_21093...
RamNeymarjr
 
PDF
TIC ACTIVIDAD 1geeeeeeeeeeeeeeeeeeeeeeeeeeeeeer3.pdf
Thais Ruiz
 
PPTX
lecture 13 mind test academy it skills.pptx
ggesjmrasoolpark
 
PPTX
Web dev -ppt that helps us understand web technology
shubhragoyal12
 
Data-Users-in-Database-Management-Systems (1).pptx
dharmik832021
 
SUMMER INTERNSHIP REPORT[1] (AutoRecovered) (6) (1).pdf
pandeydiksha814
 
Future_of_AI_Presentation for everyone.pptx
boranamanju07
 
Blue and Dark Blue Modern Technology Presentation.pptx
ap177979
 
Introduction to Biostatistics Presentation.pptx
AtemJoshua
 
HSE WEEKLY REPORT for dummies and lazzzzy.pptx
ahmedibrahim691723
 
INFO8116 -Big data architecture and analytics
guddipatel10
 
Blue Futuristic Cyber Security Presentation.pdf
tanvikhunt1003
 
Introduction-to-Python-Programming-Language (1).pptx
dhyeysapariya
 
short term project on AI Driven Data Analytics
JMJCollegeComputerde
 
IP_Journal_Articles_2025IP_Journal_Articles_2025
mishell212144
 
World-population.pptx fire bunberbpeople
umutunsalnsl4402
 
Probability systematic sampling methods.pptx
PrakashRajput19
 
The whitetiger novel review for collegeassignment.pptx
DhruvPatel754154
 
Technical Writing Module-I Complete Notes.pdf
VedprakashArya13
 
Presentation on animal welfare a good topic
kidscream385
 
White Blue Simple Modern Enhancing Sales Strategy Presentation_20250724_21093...
RamNeymarjr
 
TIC ACTIVIDAD 1geeeeeeeeeeeeeeeeeeeeeeeeeeeeeer3.pdf
Thais Ruiz
 
lecture 13 mind test academy it skills.pptx
ggesjmrasoolpark
 
Web dev -ppt that helps us understand web technology
shubhragoyal12
 

Why is postgis awesome?

  • 1. Why is PostGIS awesome? Reason 1: it is open source Kasper Van Lombeek - Forespell.com 17 / 11 / 2016 - DS Meetup Antwerp
  • 2. First we need to understand: Why did SQL need an extension?
  • 3. Problem 1: data storage
  • 4. Try to store this rectangle in a db A db that allows only atomic data points. P1 P2 P3P4
  • 5. Lets tryPid X Y P1 0 0 P2 0 1 P3 1 1 P4 1 0 Table 1: points Eid Pid E1 P1 E1 P2 E2 P2 E2 … P3 … Table 3: Starts_or_ends Eid Length E1 1 E2 1 E3 1 E4 1 Table 2: Edges P1 P2 P3P4 E1 E2 E3 E4 Rid Eid R1 E1 R1 E2 R1 E3 R1 … E4 … Table 4: Boundary Rid Rname R1 UnitSquare Table 5: Rectangle
  • 6. Lets try storing all the neighbourhoods in Belgium?
  • 7. Solution: SQL 3 custom spatial data types PostGIS follows the Simple Features for SQL specification from the Open Geospatial Consortium (OGC).
  • 8. Problem 2: querying the database
  • 9. How to query our db? Describe in words how to query the points within the rectangle.
  • 10. What about a more complex shape? Would your query still work?
  • 11. Solution: spatial operators Provided by GEOS - Geometry Engine, Open Source
  • 12. Problem 3: querying the database fast
  • 13. In which area do we have most bicycle thefts?
  • 14. Need for an index
  • 15. Solution: spatial index R-tree implementation of bounding boxes of geometries
  • 16. These three solutions are integrated in PostGIS - Geometry types for Points, LineStrings, Polygons, MultiPoints, MultiLineStrings, MultipPolygons and GeometryCollections. - Spatial predicates for determining the interactions of geometries using the 3x3 DE-9IM (provided by the GEOS software library). - Spatial operators for determining geospatial measurements like area, distance, length and perimeter. - Spatial operators for determining geospatial set operations, like union, difference, symmetric difference and buffers (provided by GEOS). - R-tree-over-GiST (Generalized Search Tree) spatial indexes for high speed spatial querying. - Index selectivity support, to provide high performance query plans for mixed spatial/non-spatial queries. - For raster data, PostGIS WKT Raster (now integrated into PostGIS 2.0+ and renamed PostGIS Raster) - The PostGIS implementation is based on "light-weight" geometries and indexes optimized to reduce disk and memory footprint. Using light-weight geometries helps servers increase the amount of data migrated up from physical disk storage into RAM, improving query performance substantially. - PostGIS is registered as "implements the specified standard" for "Simple Features for SQL" by the OGC.[2] PostGIS has not been certified as compliant by the OGC. For the OGC's definition of compliant, see What does "Compliant" mean?. Source: wikipedia
  • 17. Demo in IPython notebook