SlideShare a Scribd company logo
1 of 46
Using PostGIS to add some spatial flavor to your applications  Steven Citron-Pousty Developer Evangelist  deCarta
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Assumptions about you ,[object Object],[object Object],[object Object],[object Object],[object Object]
 
What is PostGIS ,[object Object],[object Object],[object Object]
Competitive Offerings ,[object Object],[object Object],[object Object],[object Object],[object Object]
Installing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Other Steps ,[object Object],[object Object],[object Object]
Two more things you need to understand Almost there – I promise
 
Shapefiles when is a file not a file
Projections and Datums
 
More Projection Goodness ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Projecting using ogr2ogr ,[object Object],[object Object],[object Object]
Now let’s make some SQL ,[object Object],[object Object],[object Object]
Y’all know what to do with SQL ,[object Object],[object Object]
 
Let’s get this party started ,[object Object],[object Object],[object Object],WTF!
Well Known Text (WKT) ,[object Object],[object Object],[object Object],[object Object]
Lesson Learned ,[object Object],[object Object],[object Object],SELECT asKML(the_geom) FROM  watercourses WHERE gid = 17;
<MultiGeometry> <Polygon> <outerBoundaryIs> <LinearRing> <coordinates>-118.90476592 907,35.4477387779291  -118.904082378315,35.4465853812531  -118.904745088997,35.447 2133838697  -118.90476592907,35.4477387779291</coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </MultiGeometry>
Inserting a new record ,[object Object],INSERT INTO firestations(station_na, the_geom) VALUES('Best LittleFire House in CA', ST_SetSRID(ST_MakePoint(-119.5, 34.5), 4326) );
Select using the geometry
 
Distance  ,[object Object],SELECT gid FROM waterbodies WHERE  ST_DWithin('SRID=4326;POINT (-119.103762382096 35.4122898449297)',  the_geom, 0.005);   gid -----   4   5   6   7   8
Let’s find all the parcels in Agricultural Zones SELECT p.gid FROM parcels AS p,  zoning AS z WHERE z.comb_zn  LIKE 'A%' AND  ST_Within(p.the_geom, z.the_geom);
Do something with the geometry after selection
 
Calculating Area SELECT  sum(ST_Area(z.the_geom))  FROM zoning AS z WHERE z.comb_zn LIKE 'NR%'; sum -------------------- 0.0131834159551545
Turn polygons into points SELECT gid,  asText(ST_Centroid(the_geom))  FROM waterbodies WHERE gid = 124; gid |  geometry -----+------------------------------------------- 124 | POINT(-118.427120958287 35.6702299014044) SELECT gid,  asText(ST_PointOnSurface(the_geom))  FROM waterbodies WHERE gid = 124; gid |  geometry -----+------------------------------------------- 124 | POINT(-118.449967685908 35.6911672413056)
Create new tables using a select CREATE TABLE biglake WITH OIDS AS SELECT gid, the_geom FROM waterbodies WHERE gid = 124; SELECT  ST_AREA(the_geom)  FROM biglake; st_area --------------------- 0.00313986591299908
Buffering
Some SQL to buffer SELECT  ST_Area(ST_Buffer(the_geom, 0.1))  FROM biglake; st_area -------------------- 0.0718529848413709 Remember that is used to be 0.003
 
Spatial Operators
Clip to the bounding box SELECT gid,  ST_Intersection(the_geom, 'SRID=4326;MULTIPOLYGON((( -119.5 35.0, -119.0 35.0, -119.0 35.5, -119.5 35.5, -119.5 35.0)))')   FROM watercourses WHERE  ST_Intersects(the_geom,  'SRID=4326;MULTIPOLYGON((( -119.5 35.0, -119.0 35.0, -119.0 35.5, -119.5 35.5, -119.5 35.0)))');
Simplifying geometries ,[object Object],[object Object],[object Object]
Select  ST_NPoints(the_geom)  FROM  watercourses WHERE gid IN (12, 14, 17); st_npoints ------------ 265 68 48
SELECT  ST_NPoints(ST_Simplify(the_geom, 0.00001))  FROM watercourses WHERE gid IN (12, 14, 17); st_npoints ------------ 65 19 18
SELECT  ST_NPoints(ST_Simplify(the_geom, 0.0001))  FROM watercourses WHERE gid IN (12, 14, 17); st_npoints ------------ 18 6 7
So how do you bring this together in an app ,[object Object],[object Object],[object Object]
Where do you go now - PostGIS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Where to get Data ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Map API to use ,[object Object],[object Object],[object Object],[object Object]
 

More Related Content

What's hot

LX êł”ê°„ì •ëłŽì•„ìčŽë°ëŻž PostGIS ê°•ì˜ìžëŁŒ
LX êł”ê°„ì •ëłŽì•„ìčŽë°ëŻž PostGIS ê°•ì˜ìžëŁŒLX êł”ê°„ì •ëłŽì•„ìčŽë°ëŻž PostGIS ê°•ì˜ìžëŁŒ
LX êł”ê°„ì •ëłŽì•„ìčŽë°ëŻž PostGIS ê°•ì˜ìžëŁŒJungHwan Yun
 
PostGIS - National Education Center for GIS: Open Source GIS
PostGIS - National Education Center for GIS: Open Source GIS PostGIS - National Education Center for GIS: Open Source GIS
PostGIS - National Education Center for GIS: Open Source GIS MinPa Lee
 
GeoServer, an introduction for beginners
GeoServer, an introduction for beginnersGeoServer, an introduction for beginners
GeoServer, an introduction for beginnersGeoSolutions
 
Geoinformatics handbook
Geoinformatics handbookGeoinformatics handbook
Geoinformatics handbookMOHAMMEDFAIZAN69
 
Introduction of GIS & Remote Sensing (RS)
Introduction of GIS & Remote Sensing (RS)Introduction of GIS & Remote Sensing (RS)
Introduction of GIS & Remote Sensing (RS)Subtain Hussain Syed
 
07QGISでéșè·Ąç«‹ćœ°ćˆ†æž
07QGISでéșè·Ąç«‹ćœ°ćˆ†æž07QGISでéșè·Ąç«‹ćœ°ćˆ†æž
07QGISでéșè·Ąç«‹ćœ°ćˆ†æžJunpei Ishii
 
Mahir ArcGIS 10 - [Untuk Pemula]
Mahir ArcGIS 10 - [Untuk Pemula]Mahir ArcGIS 10 - [Untuk Pemula]
Mahir ArcGIS 10 - [Untuk Pemula]Luhur Moekti Prayogo
 
GeoServer Ʞ쎈
GeoServer Ʞ쎈GeoServer Ʞ쎈
GeoServer Ʞ쎈Seong geon Kim
 
Global positioning system (GPS)
Global positioning system (GPS)Global positioning system (GPS)
Global positioning system (GPS)Chandana R
 
ă‚ȘăƒŒăƒ—ăƒłăƒ‡ăƒŒă‚żă‚’äœżăŁăŠćœ°ć›łă‚’äœœă‚ă†ïœœQGIS æŽ»ç”šèŹ›ćș§ïŒˆćˆçŽšç·šïŒ‰
ă‚ȘăƒŒăƒ—ăƒłăƒ‡ăƒŒă‚żă‚’äœżăŁăŠćœ°ć›łă‚’äœœă‚ă†ïœœQGIS æŽ»ç”šèŹ›ćș§ïŒˆćˆçŽšç·šïŒ‰ă‚ȘăƒŒăƒ—ăƒłăƒ‡ăƒŒă‚żă‚’äœżăŁăŠćœ°ć›łă‚’äœœă‚ă†ïœœQGIS æŽ»ç”šèŹ›ćș§ïŒˆćˆçŽšç·šïŒ‰
ă‚ȘăƒŒăƒ—ăƒłăƒ‡ăƒŒă‚żă‚’äœżăŁăŠćœ°ć›łă‚’äœœă‚ă†ïœœQGIS æŽ»ç”šèŹ›ćș§ïŒˆćˆçŽšç·šïŒ‰Yu Imai
 
Intro To PostGIS
Intro To PostGISIntro To PostGIS
Intro To PostGISmleslie
 
Location Analytics - Real Time Geofencing using Apache Kafka
Location Analytics - Real Time Geofencing using Apache KafkaLocation Analytics - Real Time Geofencing using Apache Kafka
Location Analytics - Real Time Geofencing using Apache KafkaGuido Schmutz
 
Gis gps
Gis gpsGis gps
Gis gpsrrodri37
 
였픈소슀GIS ê°œëĄ  êłŒì • - OpenLayers Ʞ쎈
였픈소슀GIS ê°œëĄ  êłŒì • - OpenLayers Ʞ쎈였픈소슀GIS ê°œëĄ  êłŒì • - OpenLayers Ʞ쎈
였픈소슀GIS ê°œëĄ  êłŒì • - OpenLayers Ʞ쎈HaNJiN Lee
 
FOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesFOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesTodd Barr
 
What is Geography Information Systems (GIS)
What is Geography Information Systems (GIS)What is Geography Information Systems (GIS)
What is Geography Information Systems (GIS)John Lanser
 
ăƒˆăƒŹă‚·ă‚™ăƒŁăƒŒăƒ†ă‚™ăƒŒă‚żăźăƒă‚™ăƒƒăƒă‚Żă‚šăƒȘべケドホッククスăƒȘă‚’ç†è§Łă™ă‚‹
ăƒˆăƒŹă‚·ă‚™ăƒŁăƒŒăƒ†ă‚™ăƒŒă‚żăźăƒă‚™ăƒƒăƒă‚Żă‚šăƒȘべケドホッククスăƒȘă‚’ç†è§Łă™ă‚‹ăƒˆăƒŹă‚·ă‚™ăƒŁăƒŒăƒ†ă‚™ăƒŒă‚żăźăƒă‚™ăƒƒăƒă‚Żă‚šăƒȘべケドホッククスăƒȘă‚’ç†è§Łă™ă‚‹
ăƒˆăƒŹă‚·ă‚™ăƒŁăƒŒăƒ†ă‚™ăƒŒă‚żăźăƒă‚™ăƒƒăƒă‚Żă‚šăƒȘべケドホッククスăƒȘă‚’ç†è§Łă™ă‚‹Takahiro Inoue
 
Table partitioning in PostgreSQL + Rails
Table partitioning in PostgreSQL + RailsTable partitioning in PostgreSQL + Rails
Table partitioning in PostgreSQL + RailsAgnieszka Figiel
 
An introduction to geographic information systems (gis) m goulbourne 2007
An introduction to geographic information systems (gis)   m goulbourne 2007An introduction to geographic information systems (gis)   m goulbourne 2007
An introduction to geographic information systems (gis) m goulbourne 2007Michelle Goulbourne @ DiaMind Health
 

What's hot (20)

LX êł”ê°„ì •ëłŽì•„ìčŽë°ëŻž PostGIS ê°•ì˜ìžëŁŒ
LX êł”ê°„ì •ëłŽì•„ìčŽë°ëŻž PostGIS ê°•ì˜ìžëŁŒLX êł”ê°„ì •ëłŽì•„ìčŽë°ëŻž PostGIS ê°•ì˜ìžëŁŒ
LX êł”ê°„ì •ëłŽì•„ìčŽë°ëŻž PostGIS ê°•ì˜ìžëŁŒ
 
PostGIS - National Education Center for GIS: Open Source GIS
PostGIS - National Education Center for GIS: Open Source GIS PostGIS - National Education Center for GIS: Open Source GIS
PostGIS - National Education Center for GIS: Open Source GIS
 
GeoServer, an introduction for beginners
GeoServer, an introduction for beginnersGeoServer, an introduction for beginners
GeoServer, an introduction for beginners
 
Geoinformatics handbook
Geoinformatics handbookGeoinformatics handbook
Geoinformatics handbook
 
Introduction of GIS & Remote Sensing (RS)
Introduction of GIS & Remote Sensing (RS)Introduction of GIS & Remote Sensing (RS)
Introduction of GIS & Remote Sensing (RS)
 
07QGISでéșè·Ąç«‹ćœ°ćˆ†æž
07QGISでéșè·Ąç«‹ćœ°ćˆ†æž07QGISでéșè·Ąç«‹ćœ°ćˆ†æž
07QGISでéșè·Ąç«‹ćœ°ćˆ†æž
 
Mahir ArcGIS 10 - [Untuk Pemula]
Mahir ArcGIS 10 - [Untuk Pemula]Mahir ArcGIS 10 - [Untuk Pemula]
Mahir ArcGIS 10 - [Untuk Pemula]
 
GeoServer Ʞ쎈
GeoServer Ʞ쎈GeoServer Ʞ쎈
GeoServer Ʞ쎈
 
Global positioning system (GPS)
Global positioning system (GPS)Global positioning system (GPS)
Global positioning system (GPS)
 
ă‚ȘăƒŒăƒ—ăƒłăƒ‡ăƒŒă‚żă‚’äœżăŁăŠćœ°ć›łă‚’äœœă‚ă†ïœœQGIS æŽ»ç”šèŹ›ćș§ïŒˆćˆçŽšç·šïŒ‰
ă‚ȘăƒŒăƒ—ăƒłăƒ‡ăƒŒă‚żă‚’äœżăŁăŠćœ°ć›łă‚’äœœă‚ă†ïœœQGIS æŽ»ç”šèŹ›ćș§ïŒˆćˆçŽšç·šïŒ‰ă‚ȘăƒŒăƒ—ăƒłăƒ‡ăƒŒă‚żă‚’äœżăŁăŠćœ°ć›łă‚’äœœă‚ă†ïœœQGIS æŽ»ç”šèŹ›ćș§ïŒˆćˆçŽšç·šïŒ‰
ă‚ȘăƒŒăƒ—ăƒłăƒ‡ăƒŒă‚żă‚’äœżăŁăŠćœ°ć›łă‚’äœœă‚ă†ïœœQGIS æŽ»ç”šèŹ›ćș§ïŒˆćˆçŽšç·šïŒ‰
 
Intro To PostGIS
Intro To PostGISIntro To PostGIS
Intro To PostGIS
 
Location Analytics - Real Time Geofencing using Apache Kafka
Location Analytics - Real Time Geofencing using Apache KafkaLocation Analytics - Real Time Geofencing using Apache Kafka
Location Analytics - Real Time Geofencing using Apache Kafka
 
Gis gps
Gis gpsGis gps
Gis gps
 
였픈소슀GIS ê°œëĄ  êłŒì • - OpenLayers Ʞ쎈
였픈소슀GIS ê°œëĄ  êłŒì • - OpenLayers Ʞ쎈였픈소슀GIS ê°œëĄ  êłŒì • - OpenLayers Ʞ쎈
였픈소슀GIS ê°œëĄ  êłŒì • - OpenLayers Ʞ쎈
 
FOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesFOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for Rookies
 
What is Geography Information Systems (GIS)
What is Geography Information Systems (GIS)What is Geography Information Systems (GIS)
What is Geography Information Systems (GIS)
 
ăƒˆăƒŹă‚·ă‚™ăƒŁăƒŒăƒ†ă‚™ăƒŒă‚żăźăƒă‚™ăƒƒăƒă‚Żă‚šăƒȘべケドホッククスăƒȘă‚’ç†è§Łă™ă‚‹
ăƒˆăƒŹă‚·ă‚™ăƒŁăƒŒăƒ†ă‚™ăƒŒă‚żăźăƒă‚™ăƒƒăƒă‚Żă‚šăƒȘべケドホッククスăƒȘă‚’ç†è§Łă™ă‚‹ăƒˆăƒŹă‚·ă‚™ăƒŁăƒŒăƒ†ă‚™ăƒŒă‚żăźăƒă‚™ăƒƒăƒă‚Żă‚šăƒȘべケドホッククスăƒȘă‚’ç†è§Łă™ă‚‹
ăƒˆăƒŹă‚·ă‚™ăƒŁăƒŒăƒ†ă‚™ăƒŒă‚żăźăƒă‚™ăƒƒăƒă‚Żă‚šăƒȘべケドホッククスăƒȘă‚’ç†è§Łă™ă‚‹
 
Table partitioning in PostgreSQL + Rails
Table partitioning in PostgreSQL + RailsTable partitioning in PostgreSQL + Rails
Table partitioning in PostgreSQL + Rails
 
An introduction to geographic information systems (gis) m goulbourne 2007
An introduction to geographic information systems (gis)   m goulbourne 2007An introduction to geographic information systems (gis)   m goulbourne 2007
An introduction to geographic information systems (gis) m goulbourne 2007
 
Web Mapping
Web MappingWeb Mapping
Web Mapping
 

Similar to Using PostGIS To Add Some Spatial Flavor To Your Application

LinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your App
LinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your AppLinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your App
LinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your AppSteven Pousty
 
Using Compuware Strobe to Save CPU: 4 Real-life Cases from the Files of CPT G...
Using Compuware Strobe to Save CPU: 4 Real-life Cases from the Files of CPT G...Using Compuware Strobe to Save CPU: 4 Real-life Cases from the Files of CPT G...
Using Compuware Strobe to Save CPU: 4 Real-life Cases from the Files of CPT G...Compuware
 
AplicaçÔes 10x a 100x mais råpida com o postgre sql
AplicaçÔes 10x a 100x mais råpida com o postgre sqlAplicaçÔes 10x a 100x mais råpida com o postgre sql
AplicaçÔes 10x a 100x mais råpida com o postgre sqlFabio Telles Rodriguez
 
Introduction To PostGIS
Introduction To PostGISIntroduction To PostGIS
Introduction To PostGISmleslie
 
FOSS4G 2010 PostGIS Raster: an Open Source alternative to Oracle GeoRaster
FOSS4G 2010 PostGIS Raster: an Open Source alternative to Oracle GeoRasterFOSS4G 2010 PostGIS Raster: an Open Source alternative to Oracle GeoRaster
FOSS4G 2010 PostGIS Raster: an Open Source alternative to Oracle GeoRasterJorge Arevalo
 
Around the world with extensions | PostgreSQL Conference Europe 2018 | Craig ...
Around the world with extensions | PostgreSQL Conference Europe 2018 | Craig ...Around the world with extensions | PostgreSQL Conference Europe 2018 | Craig ...
Around the world with extensions | PostgreSQL Conference Europe 2018 | Craig ...Citus Data
 
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in Android
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in AndroidIntroducing the Galileo PVT App:from Assisted GNSS to NeQuick model in Android
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in AndroidThe European GNSS Agency (GSA)
 
ANEL GROUP - BIM Implementation
ANEL GROUP - BIM Implementation ANEL GROUP - BIM Implementation
ANEL GROUP - BIM Implementation Cesare Caoduro
 
Geo django
Geo djangoGeo django
Geo djangoKoh Yeong
 
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfHailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfcookie1969
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech ProjectsJody Garnett
 
Scaling PostreSQL with Stado
Scaling PostreSQL with StadoScaling PostreSQL with Stado
Scaling PostreSQL with StadoJim Mlodgenski
 
Optimization based Chassis Design
Optimization based Chassis DesignOptimization based Chassis Design
Optimization based Chassis DesignAltair
 
Open Source Web Mapping Servers: Which horse for which course?
Open Source Web Mapping Servers: Which horse for which course?Open Source Web Mapping Servers: Which horse for which course?
Open Source Web Mapping Servers: Which horse for which course?antscott
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performanceGuy Harrison
 
[D15] æœ€ćŒ·ă«ă‚čă‚±ăƒŒăƒ©ăƒ–ăƒ«ăȘă‚«ăƒ©ăƒ ăƒŠăƒŒDBよ、Hadoopăšăźă‚żăƒƒă‚°ă§ăƒ“ăƒƒă‚°ăƒ‡ăƒŒă‚żăźćœ°ćčłă‚’ç›źæŒ‡ă›ïŒby Daisuke Hirama
[D15] æœ€ćŒ·ă«ă‚čă‚±ăƒŒăƒ©ăƒ–ăƒ«ăȘă‚«ăƒ©ăƒ ăƒŠăƒŒDBよ、Hadoopăšăźă‚żăƒƒă‚°ă§ăƒ“ăƒƒă‚°ăƒ‡ăƒŒă‚żăźćœ°ćčłă‚’ç›źæŒ‡ă›ïŒby Daisuke Hirama[D15] æœ€ćŒ·ă«ă‚čă‚±ăƒŒăƒ©ăƒ–ăƒ«ăȘă‚«ăƒ©ăƒ ăƒŠăƒŒDBよ、Hadoopăšăźă‚żăƒƒă‚°ă§ăƒ“ăƒƒă‚°ăƒ‡ăƒŒă‚żăźćœ°ćčłă‚’ç›źæŒ‡ă›ïŒby Daisuke Hirama
[D15] æœ€ćŒ·ă«ă‚čă‚±ăƒŒăƒ©ăƒ–ăƒ«ăȘă‚«ăƒ©ăƒ ăƒŠăƒŒDBよ、Hadoopăšăźă‚żăƒƒă‚°ă§ăƒ“ăƒƒă‚°ăƒ‡ăƒŒă‚żăźćœ°ćčłă‚’ç›źæŒ‡ă›ïŒby Daisuke HiramaInsight Technology, Inc.
 
Improving the performance of Odoo deployments
Improving the performance of Odoo deploymentsImproving the performance of Odoo deployments
Improving the performance of Odoo deploymentsOdoo
 

Similar to Using PostGIS To Add Some Spatial Flavor To Your Application (20)

LinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your App
LinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your AppLinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your App
LinuxFest NW - Using Postgis To Add Some Spatial Flavor To Your App
 
Using Compuware Strobe to Save CPU: 4 Real-life Cases from the Files of CPT G...
Using Compuware Strobe to Save CPU: 4 Real-life Cases from the Files of CPT G...Using Compuware Strobe to Save CPU: 4 Real-life Cases from the Files of CPT G...
Using Compuware Strobe to Save CPU: 4 Real-life Cases from the Files of CPT G...
 
Explain this!
Explain this!Explain this!
Explain this!
 
AplicaçÔes 10x a 100x mais råpida com o postgre sql
AplicaçÔes 10x a 100x mais råpida com o postgre sqlAplicaçÔes 10x a 100x mais råpida com o postgre sql
AplicaçÔes 10x a 100x mais råpida com o postgre sql
 
Introduction To PostGIS
Introduction To PostGISIntroduction To PostGIS
Introduction To PostGIS
 
FOSS4G 2010 PostGIS Raster: an Open Source alternative to Oracle GeoRaster
FOSS4G 2010 PostGIS Raster: an Open Source alternative to Oracle GeoRasterFOSS4G 2010 PostGIS Raster: an Open Source alternative to Oracle GeoRaster
FOSS4G 2010 PostGIS Raster: an Open Source alternative to Oracle GeoRaster
 
Spatial SQL
Spatial SQLSpatial SQL
Spatial SQL
 
Around the world with extensions | PostgreSQL Conference Europe 2018 | Craig ...
Around the world with extensions | PostgreSQL Conference Europe 2018 | Craig ...Around the world with extensions | PostgreSQL Conference Europe 2018 | Craig ...
Around the world with extensions | PostgreSQL Conference Europe 2018 | Craig ...
 
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in Android
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in AndroidIntroducing the Galileo PVT App:from Assisted GNSS to NeQuick model in Android
Introducing the Galileo PVT App:from Assisted GNSS to NeQuick model in Android
 
ANEL GROUP - BIM Implementation
ANEL GROUP - BIM Implementation ANEL GROUP - BIM Implementation
ANEL GROUP - BIM Implementation
 
Polardb percona-19
Polardb percona-19Polardb percona-19
Polardb percona-19
 
Geo django
Geo djangoGeo django
Geo django
 
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfHailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech Projects
 
Scaling PostreSQL with Stado
Scaling PostreSQL with StadoScaling PostreSQL with Stado
Scaling PostreSQL with Stado
 
Optimization based Chassis Design
Optimization based Chassis DesignOptimization based Chassis Design
Optimization based Chassis Design
 
Open Source Web Mapping Servers: Which horse for which course?
Open Source Web Mapping Servers: Which horse for which course?Open Source Web Mapping Servers: Which horse for which course?
Open Source Web Mapping Servers: Which horse for which course?
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
 
[D15] æœ€ćŒ·ă«ă‚čă‚±ăƒŒăƒ©ăƒ–ăƒ«ăȘă‚«ăƒ©ăƒ ăƒŠăƒŒDBよ、Hadoopăšăźă‚żăƒƒă‚°ă§ăƒ“ăƒƒă‚°ăƒ‡ăƒŒă‚żăźćœ°ćčłă‚’ç›źæŒ‡ă›ïŒby Daisuke Hirama
[D15] æœ€ćŒ·ă«ă‚čă‚±ăƒŒăƒ©ăƒ–ăƒ«ăȘă‚«ăƒ©ăƒ ăƒŠăƒŒDBよ、Hadoopăšăźă‚żăƒƒă‚°ă§ăƒ“ăƒƒă‚°ăƒ‡ăƒŒă‚żăźćœ°ćčłă‚’ç›źæŒ‡ă›ïŒby Daisuke Hirama[D15] æœ€ćŒ·ă«ă‚čă‚±ăƒŒăƒ©ăƒ–ăƒ«ăȘă‚«ăƒ©ăƒ ăƒŠăƒŒDBよ、Hadoopăšăźă‚żăƒƒă‚°ă§ăƒ“ăƒƒă‚°ăƒ‡ăƒŒă‚żăźćœ°ćčłă‚’ç›źæŒ‡ă›ïŒby Daisuke Hirama
[D15] æœ€ćŒ·ă«ă‚čă‚±ăƒŒăƒ©ăƒ–ăƒ«ăȘă‚«ăƒ©ăƒ ăƒŠăƒŒDBよ、Hadoopăšăźă‚żăƒƒă‚°ă§ăƒ“ăƒƒă‚°ăƒ‡ăƒŒă‚żăźćœ°ćčłă‚’ç›źæŒ‡ă›ïŒby Daisuke Hirama
 
Improving the performance of Odoo deployments
Improving the performance of Odoo deploymentsImproving the performance of Odoo deployments
Improving the performance of Odoo deployments
 

More from Steven Pousty

APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + DockerAPPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + DockerSteven Pousty
 
Introduction to PaaS for application developers
Introduction to PaaS for application developersIntroduction to PaaS for application developers
Introduction to PaaS for application developersSteven Pousty
 
London Cloud Summit 2014 - raising the tide: getting developers in the cloud
London Cloud Summit 2014  - raising the tide: getting developers in the cloudLondon Cloud Summit 2014  - raising the tide: getting developers in the cloud
London Cloud Summit 2014 - raising the tide: getting developers in the cloudSteven Pousty
 
Workshop For pycon13
Workshop For pycon13Workshop For pycon13
Workshop For pycon13Steven Pousty
 
Build a PaaS with OpenShift Origin
Build a PaaS with OpenShift OriginBuild a PaaS with OpenShift Origin
Build a PaaS with OpenShift OriginSteven Pousty
 
Monkigras - dropping science on your developer ecosystem
Monkigras - dropping science on your developer ecosystemMonkigras - dropping science on your developer ecosystem
Monkigras - dropping science on your developer ecosystemSteven Pousty
 
Spatial script for MongoBoulder
Spatial script for MongoBoulderSpatial script for MongoBoulder
Spatial script for MongoBoulderSteven Pousty
 
Spatial MongoDB, Node.JS, and Express - server-side JS for your application
Spatial MongoDB, Node.JS, and Express - server-side JS for your applicationSpatial MongoDB, Node.JS, and Express - server-side JS for your application
Spatial MongoDB, Node.JS, and Express - server-side JS for your applicationSteven Pousty
 
Spatial script for CIMA
Spatial script for CIMASpatial script for CIMA
Spatial script for CIMASteven Pousty
 
Spatial script for my JS.Everywhere 2012
Spatial script for my JS.Everywhere 2012Spatial script for my JS.Everywhere 2012
Spatial script for my JS.Everywhere 2012Steven Pousty
 
Spatial Mongo and Node.JS on Openshift JS.Everywhere 2012
Spatial Mongo and Node.JS on Openshift JS.Everywhere 2012Spatial Mongo and Node.JS on Openshift JS.Everywhere 2012
Spatial Mongo and Node.JS on Openshift JS.Everywhere 2012Steven Pousty
 
Spatial script for Spatial mongo for PHP and Zend
Spatial script for Spatial mongo for PHP and ZendSpatial script for Spatial mongo for PHP and Zend
Spatial script for Spatial mongo for PHP and ZendSteven Pousty
 
Spatial mongo for PHP and Zend
Spatial mongo for PHP and ZendSpatial mongo for PHP and Zend
Spatial mongo for PHP and ZendSteven Pousty
 
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem ManagementDropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem ManagementSteven Pousty
 
Open shift intro for Philly PUG
Open shift intro for Philly PUGOpen shift intro for Philly PUG
Open shift intro for Philly PUGSteven Pousty
 
Open shift intro for Philly PUG
Open shift intro for Philly PUGOpen shift intro for Philly PUG
Open shift intro for Philly PUGSteven Pousty
 
Script for the geomeetup presentation
Script for the geomeetup presentationScript for the geomeetup presentation
Script for the geomeetup presentationSteven Pousty
 
Openshift GeoSpatial Capabilities
Openshift GeoSpatial CapabilitiesOpenshift GeoSpatial Capabilities
Openshift GeoSpatial CapabilitiesSteven Pousty
 
MongoSF - Spatial MongoDB in OpenShift - script file
MongoSF - Spatial MongoDB in OpenShift - script fileMongoSF - Spatial MongoDB in OpenShift - script file
MongoSF - Spatial MongoDB in OpenShift - script fileSteven Pousty
 
Mongo sf spatialmongo
Mongo sf spatialmongoMongo sf spatialmongo
Mongo sf spatialmongoSteven Pousty
 

More from Steven Pousty (20)

APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + DockerAPPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
APPLICATIONS AND CONTAINERS AT SCALE: OpenShift + Kubernetes + Docker
 
Introduction to PaaS for application developers
Introduction to PaaS for application developersIntroduction to PaaS for application developers
Introduction to PaaS for application developers
 
London Cloud Summit 2014 - raising the tide: getting developers in the cloud
London Cloud Summit 2014  - raising the tide: getting developers in the cloudLondon Cloud Summit 2014  - raising the tide: getting developers in the cloud
London Cloud Summit 2014 - raising the tide: getting developers in the cloud
 
Workshop For pycon13
Workshop For pycon13Workshop For pycon13
Workshop For pycon13
 
Build a PaaS with OpenShift Origin
Build a PaaS with OpenShift OriginBuild a PaaS with OpenShift Origin
Build a PaaS with OpenShift Origin
 
Monkigras - dropping science on your developer ecosystem
Monkigras - dropping science on your developer ecosystemMonkigras - dropping science on your developer ecosystem
Monkigras - dropping science on your developer ecosystem
 
Spatial script for MongoBoulder
Spatial script for MongoBoulderSpatial script for MongoBoulder
Spatial script for MongoBoulder
 
Spatial MongoDB, Node.JS, and Express - server-side JS for your application
Spatial MongoDB, Node.JS, and Express - server-side JS for your applicationSpatial MongoDB, Node.JS, and Express - server-side JS for your application
Spatial MongoDB, Node.JS, and Express - server-side JS for your application
 
Spatial script for CIMA
Spatial script for CIMASpatial script for CIMA
Spatial script for CIMA
 
Spatial script for my JS.Everywhere 2012
Spatial script for my JS.Everywhere 2012Spatial script for my JS.Everywhere 2012
Spatial script for my JS.Everywhere 2012
 
Spatial Mongo and Node.JS on Openshift JS.Everywhere 2012
Spatial Mongo and Node.JS on Openshift JS.Everywhere 2012Spatial Mongo and Node.JS on Openshift JS.Everywhere 2012
Spatial Mongo and Node.JS on Openshift JS.Everywhere 2012
 
Spatial script for Spatial mongo for PHP and Zend
Spatial script for Spatial mongo for PHP and ZendSpatial script for Spatial mongo for PHP and Zend
Spatial script for Spatial mongo for PHP and Zend
 
Spatial mongo for PHP and Zend
Spatial mongo for PHP and ZendSpatial mongo for PHP and Zend
Spatial mongo for PHP and Zend
 
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem ManagementDropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
Dropping Science on Your Developer Ecosystem - lessons from Ecosystem Management
 
Open shift intro for Philly PUG
Open shift intro for Philly PUGOpen shift intro for Philly PUG
Open shift intro for Philly PUG
 
Open shift intro for Philly PUG
Open shift intro for Philly PUGOpen shift intro for Philly PUG
Open shift intro for Philly PUG
 
Script for the geomeetup presentation
Script for the geomeetup presentationScript for the geomeetup presentation
Script for the geomeetup presentation
 
Openshift GeoSpatial Capabilities
Openshift GeoSpatial CapabilitiesOpenshift GeoSpatial Capabilities
Openshift GeoSpatial Capabilities
 
MongoSF - Spatial MongoDB in OpenShift - script file
MongoSF - Spatial MongoDB in OpenShift - script fileMongoSF - Spatial MongoDB in OpenShift - script file
MongoSF - Spatial MongoDB in OpenShift - script file
 
Mongo sf spatialmongo
Mongo sf spatialmongoMongo sf spatialmongo
Mongo sf spatialmongo
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Using PostGIS To Add Some Spatial Flavor To Your Application

  • 1. Using PostGIS to add some spatial flavor to your applications Steven Citron-Pousty Developer Evangelist deCarta
  • 2.
  • 3.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Two more things you need to understand Almost there – I promise
  • 10.  
  • 11. Shapefiles when is a file not a file
  • 13.  
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.  
  • 19.
  • 20.
  • 21.
  • 22. <MultiGeometry> <Polygon> <outerBoundaryIs> <LinearRing> <coordinates>-118.90476592 907,35.4477387779291 -118.904082378315,35.4465853812531 -118.904745088997,35.447 2133838697 -118.90476592907,35.4477387779291</coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </MultiGeometry>
  • 23.
  • 24. Select using the geometry
  • 25.  
  • 26.
  • 27. Let’s find all the parcels in Agricultural Zones SELECT p.gid FROM parcels AS p, zoning AS z WHERE z.comb_zn LIKE 'A%' AND ST_Within(p.the_geom, z.the_geom);
  • 28. Do something with the geometry after selection
  • 29.  
  • 30. Calculating Area SELECT sum(ST_Area(z.the_geom)) FROM zoning AS z WHERE z.comb_zn LIKE 'NR%'; sum -------------------- 0.0131834159551545
  • 31. Turn polygons into points SELECT gid, asText(ST_Centroid(the_geom)) FROM waterbodies WHERE gid = 124; gid | geometry -----+------------------------------------------- 124 | POINT(-118.427120958287 35.6702299014044) SELECT gid, asText(ST_PointOnSurface(the_geom)) FROM waterbodies WHERE gid = 124; gid | geometry -----+------------------------------------------- 124 | POINT(-118.449967685908 35.6911672413056)
  • 32. Create new tables using a select CREATE TABLE biglake WITH OIDS AS SELECT gid, the_geom FROM waterbodies WHERE gid = 124; SELECT ST_AREA(the_geom) FROM biglake; st_area --------------------- 0.00313986591299908
  • 34. Some SQL to buffer SELECT ST_Area(ST_Buffer(the_geom, 0.1)) FROM biglake; st_area -------------------- 0.0718529848413709 Remember that is used to be 0.003
  • 35.  
  • 37. Clip to the bounding box SELECT gid, ST_Intersection(the_geom, 'SRID=4326;MULTIPOLYGON((( -119.5 35.0, -119.0 35.0, -119.0 35.5, -119.5 35.5, -119.5 35.0)))') FROM watercourses WHERE ST_Intersects(the_geom, 'SRID=4326;MULTIPOLYGON((( -119.5 35.0, -119.0 35.0, -119.0 35.5, -119.5 35.5, -119.5 35.0)))');
  • 38.
  • 39. Select ST_NPoints(the_geom) FROM watercourses WHERE gid IN (12, 14, 17); st_npoints ------------ 265 68 48
  • 40. SELECT ST_NPoints(ST_Simplify(the_geom, 0.00001)) FROM watercourses WHERE gid IN (12, 14, 17); st_npoints ------------ 65 19 18
  • 41. SELECT ST_NPoints(ST_Simplify(the_geom, 0.0001)) FROM watercourses WHERE gid IN (12, 14, 17); st_npoints ------------ 18 6 7
  • 42.
  • 43.
  • 44.
  • 45.
  • 46. Â