SlideShare a Scribd company logo
Using PostGIS to add some spatial flavor to your applications  Steven Citron-Pousty Developer Evangelist  deCarta
Agenda What is PostGIS Installing Getting data and importing Using in an application ASK QUESTIONS ALL ALONG
Assumptions about you Know PostgreSQL and SQL New to spatial analysis and PostGIS Mainly using a commercial mapping service for your base layers Interested in writing cool applications This will only be a short shallow introduction
 
What is PostGIS PostGIS adds support for geographic objects and geographic functions to PostgreSQL Points, Lines, Polygon, and Linear References Spatial function such as area, near, overlap, within, clip, and simplify
Competitive Offerings MySQL – doesn’t really implement all the functions and it only deals with bounding boxes SQLServer – only in SQLServer2008 but supported on all editions Oracle Spatial – full featured and includes a broad range of client libraries DB2 and Sybase and Informix and Ingres ESRI’s SDE can use PostGIS as a DB
Installing Other libraries you want Proj4.5 for projection GEOS 3.0 for spatial operations Windows – use the “application stack builder” There are RPMs on the PostGIS site – not always the latest You can use Synaptic for Ubuntu – not always the latest Build is really simple, as long as you have required libraries installed
Other Steps Add the objects and functions from the provided SQL files Best practice is to make these into a template for future databases From there making DBs is easy cheesy
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 EPSG  (European Petroleum Survey Group)  has a number for most projections and datum combinations deCarta, and those other no names, expect geographic coordinates with WGS84 datum EPSG:4326   Geographic coordinates system with WGS84 datum.  Degrees are not constant distance as you move North and South Not very accurate for distance and area calcs except over small areas You want to use projected layers (or project on the fly) for area and distance calcs
Projecting using ogr2ogr Assuming there is a .prj file you need to find your output projection http://Spatialreference.org ogr2ogr  -t_srs EPSG:4326 -f "ESRI Shapefile" water_bodies_gcs.shp water_bodies.shp
Now let’s make some SQL Shp2pgsql is a command-line utility to take a shapefile to a SQL file The geometry field is called  the_geom shp2pgsql.exe -s 4326 -I C:ataater_bodies_gcs.shp waterbodies > C:ataaterbodies.sql
Y’all know what to do with SQL psql -q -U postgres -f C:ataaterbodies.sql kerncounty With lots-o-features you want to use –q option to prevent spamming your terminal
 
Let’s get this party started SELECT  gid, the_geom FROM waterbodies  WHERE  gid = 2; gid |  the_geom -----+------------------------------------------------------------------------------------------------------------------------  2 | 106000020E6100000010000000103000000010000002E00000002CB8FC170C65DC06200F8D0E7B341408625910970C65DC0DE898BCAE7B3414053748B1A6FC65DC0199092E7E6B34140576BAFCB6EC65DC07815C607E6B34140926B64A66EC65DC0D0D11854E4B34140CA783CC66EC65DC091477CD7E2B34140FD8B372B6FC65DC02D75F091E1B341400748F1756FC65DC02C1C7C06E0B34140A0CBF8846FC65DC01B057AC2DEB34140BD6BDE586FC65DC036C25B1ADEB34140E73E8FBC6EC65DC051B6DE2DDDB3414037EFA3B86DC65DC0A6E75E4DDCB34140EECF5AF16CC65DC007312311DBB341405304E1D16CC65DC0C653541FDAB34140B352AB826CC65DC06800DD22D9B34140FDECCB8C6CC65DC0A8D8188ED7B3414028DA62606DC65DC03020AA9DD5B341401345D79D6EC65DC045CF8743D5B3414039BFF5A56FC65DC071F2D61AD6B34140D4391F4E70C65DC01F041E4CD7B34140FD50463A70C65DC0534507A5D8B3414087FB5FFA6FC65DC0C436FF22DAB3414092BF83B46FC65DC05EEC9961DBB34140456F69BC6FC65DC0E74915C3DCB34140DCCD550170C65DC022859B35DEB34140A929A59870C65DC014E6EA42DFB34140D7388A8E70C65DC0B2B22CD4DFB341405EA0F73270C65DC0E92146C4E0B341402EC4B3DE6FC65DC066AD87D3E1B3414083B732D26FC65DC0583D9907E3B3414017F8104E70C65DC07C37AB39E4B341404DFB09DA70C65DC0AB6838C7E4B341404E376F4871C65DC0D88F88EAE4B34140E290F4CC71C65DC04318C2B1E4B34140B2B1373672C65DC001CD36A7E3B3414094289CBD72C65DC032BF27F1E2B34140551D1E3773C65DC053E9A4C1E2B34140B247EEC273C65DC03C50B08FE3B34140EFFF2CD573C65DC0849F2D84E4B34140BB03E9A973C65DC0D397181FE5B341406292782B73C65DC0103A5EA9E5B34140B2EB752172C65DC0E72BDC89E5B341407818E39771C65DC0978C430BE6B34140AAE00CA471C65DC0E6C241AEE6B341405DD5367B71C65DC050325840E7B3414002CB8FC170C65DC06200F8D0E7B34140 WTF!
Well Known Text (WKT) SELECT gid, asText(the_geom) AS Geometry FROM waterbodies WHERE gid = 2; gid |  geometry -----+------------------------------------------------------------------------------------------------------------------ 2 | MULTIPOLYGON(((-119.100632086203 35.4055119715638,-119.100588218445 35.4055112058011,-119.100531231104 35.4054841485633,-119.100512429531 35.4054574696738,-119.100503538195 35.4054055329503,-119.100511130385 35.4053601605257,-119.100535206075 35.405321352397,-119.100553022028 35.405274210549,-119.100556605305 35.4052355857659,-119.100546090324 35.4052155445137,-119.100508823288 35.4051873528921,-119.100446853726 35.4051605904963,-119.100399340328 35.4051228925546,-119.100391835921 35.4050940667872,-119.100372950847 35.4050639704809,-119.100375365397 35.405015718586,-119.100425812278 35.4049565392201,-119.10050149939 35.4049457944043,-119.100564470279 35.4049714612528,-119.100604563231 35.4050078531802,-119.100599831265 35.4050489697935,-119.100584596379 35.4050945039903,-119.100567940388 35.4051324845866,-119.1005698232335.4051746229123,-119.10058625583 35.4052187928558,-119.100622330944 35.4052508971182,-119.100619921668 35.4052682131054,-19.100598089049 35.4052968351787,-119.100577998689 35.4053291714179,-119.100575017479 35.4053658960572,-119.100604549953 35.405402382471,-119.100637922046 35.4054192567285,-119.100664242372 35.4054234663778,-119.100695837816 35.4054166982392,-119.100720934285 35.4053849237043,-119.100753214358 35.4053632206036,-119.100782184037 35.405357556842,-119.100815518089 35.4053821192651,-119.100819868035 35.4054112646836,-119.10080955272 35.4054297323306,-119.100779407259 35.4054462156383,-119.100715985448 35.4054424595886,-119.100683185361 35.405457885726,-119.100686085296 35.4054773160076,-119.100676349209 35.4054947310111,-119.100632086203 35.4055119715638)))
Lesson Learned Ask for your responses in Text format when you want to know what is going on eWKT includes the projection information 'SRID=4326;MULTIPOLYGON(((-119.5 35.0, -119.0 35.0, -119.0 35.5, -119.5 35.5, -119.5 35.0)))' asKML, asSVG, or asGML 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 Projection has to match 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  In units of the underlying coverage 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 Most geometries have more information than you can display There  are algorithms for weeding out points  Trade-off retaining “shape” versus less points
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 Never send 3000 pts to the browser Putting your information in a DB gives you way more control over what you return and display http://demo.decarta.com/opensearchservice/index.html
Where do you go now - PostGIS Home http://postgis.refractions.net/ Tools to use with PostGIS http://postgis.refractions.net/support/wiki/index.php?ToolsSupportPostgis Good support Wiki http://postgis.refractions.net/support/wiki/ Another Introduction http://www.mapbender.org/presentations/Spatial_Data_Management_Arnulf_Christl/Spatial_Data_Management_Arnulf_Christl.pdf Great OS-GEO resources http://www.bostongis.com/ PostGIS specific  http://www.bostongis.com/postgis_quickguide.bqg?outputformat=PDF Nice GIS on a Stick for Windows http://www.archaeogeek.com/blog/portable-gis /
Where to get Data Kern County http://www.co.kern.ca.us/gis/downloads.asp California http://gis.ca.gov/casil/ US Census  http://www.census.gov/geo/www/tiger/ Some UN http://www.grida.no/gis/index.htm http://www.geographynetwork.com/ http://gos2.geodata.gov/wps/portal/gos Open source Data http://www.fortiusone.com/ OSM http:// wiki.openstreetmap.org/index.php/Planet.osm http://code.google.com/p/osm2shp/
Map API to use http://developer.decarta.com Free to develop – sign up and be mapping and mashing within 12 hours If you want a web page with JavaScript look at the JavaScript API If you want to use Web Services then look at the web services area on the left
 

More Related Content

What's hot

오픈소스 GIS 교육 - PostGIS
오픈소스 GIS 교육 - PostGIS오픈소스 GIS 교육 - PostGIS
오픈소스 GIS 교육 - 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
 
[공간정보시스템 개론] L07 원격탐사의 개념과 활용
[공간정보시스템 개론] L07 원격탐사의 개념과 활용[공간정보시스템 개론] L07 원격탐사의 개념과 활용
[공간정보시스템 개론] L07 원격탐사의 개념과 활용
Kwang Woo NAM
 
QGIS 고급 및 PyQGIS - 김기웅, 임영현
QGIS 고급 및 PyQGIS - 김기웅, 임영현 QGIS 고급 및 PyQGIS - 김기웅, 임영현
QGIS 고급 및 PyQGIS - 김기웅, 임영현
SANGHEE SHIN
 
Location Based services
Location Based servicesLocation Based services
Location Based services
Fraj Alshahibi
 
My ppt on gis
My ppt on gisMy ppt on gis
My ppt on gis
gargsonakshi1
 
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
MinPa Lee
 
[Foss4 g2013 korea]postgis와 geoserver를 이용한 대용량 공간데이터 기반 일기도 서비스 구축 사례
[Foss4 g2013 korea]postgis와 geoserver를 이용한 대용량 공간데이터 기반 일기도 서비스 구축 사례[Foss4 g2013 korea]postgis와 geoserver를 이용한 대용량 공간데이터 기반 일기도 서비스 구축 사례
[Foss4 g2013 korea]postgis와 geoserver를 이용한 대용량 공간데이터 기반 일기도 서비스 구축 사례
BJ Jang
 
[공간정보연구원] 1일차 - QGIS 개요 및 기초
[공간정보연구원] 1일차 - QGIS 개요 및 기초[공간정보연구원] 1일차 - QGIS 개요 및 기초
[공간정보연구원] 1일차 - QGIS 개요 및 기초
slhead1
 
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
BJ Jang
 
공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정
BJ Jang
 
Web analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.comWeb analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.com
Jungsu Heo
 
GIS
GISGIS
Gps ppt
Gps pptGps ppt
지리정보체계(GIS) - [4] QGIS를 이용한 밀도 추정
지리정보체계(GIS) - [4] QGIS를 이용한 밀도 추정 지리정보체계(GIS) - [4] QGIS를 이용한 밀도 추정
지리정보체계(GIS) - [4] QGIS를 이용한 밀도 추정
Byeong-Hyeok Yu
 
Gis Day Presentation 2010 - ACCC - Expanded Version
Gis Day Presentation 2010 - ACCC - Expanded VersionGis Day Presentation 2010 - ACCC - Expanded Version
Gis Day Presentation 2010 - ACCC - Expanded Version
pdcaris
 
공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습
BJ Jang
 
Geocoding for beginners
Geocoding for beginnersGeocoding for beginners
Geocoding for beginners
Akansha Mishra
 
Evolution of GPS
Evolution of GPSEvolution of GPS
Evolution of GPS
Tracko.co.in
 
공간데이터베이스(Spatial db)
공간데이터베이스(Spatial db)공간데이터베이스(Spatial db)
공간데이터베이스(Spatial db)
H.J. SIM
 

What's hot (20)

오픈소스 GIS 교육 - PostGIS
오픈소스 GIS 교육 - PostGIS오픈소스 GIS 교육 - PostGIS
오픈소스 GIS 교육 - 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
 
[공간정보시스템 개론] L07 원격탐사의 개념과 활용
[공간정보시스템 개론] L07 원격탐사의 개념과 활용[공간정보시스템 개론] L07 원격탐사의 개념과 활용
[공간정보시스템 개론] L07 원격탐사의 개념과 활용
 
QGIS 고급 및 PyQGIS - 김기웅, 임영현
QGIS 고급 및 PyQGIS - 김기웅, 임영현 QGIS 고급 및 PyQGIS - 김기웅, 임영현
QGIS 고급 및 PyQGIS - 김기웅, 임영현
 
Location Based services
Location Based servicesLocation Based services
Location Based services
 
My ppt on gis
My ppt on gisMy ppt on gis
My ppt on gis
 
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
[QGIS] 수치지도를 이용한 DEM 생성과 지형분석
 
[Foss4 g2013 korea]postgis와 geoserver를 이용한 대용량 공간데이터 기반 일기도 서비스 구축 사례
[Foss4 g2013 korea]postgis와 geoserver를 이용한 대용량 공간데이터 기반 일기도 서비스 구축 사례[Foss4 g2013 korea]postgis와 geoserver를 이용한 대용량 공간데이터 기반 일기도 서비스 구축 사례
[Foss4 g2013 korea]postgis와 geoserver를 이용한 대용량 공간데이터 기반 일기도 서비스 구축 사례
 
[공간정보연구원] 1일차 - QGIS 개요 및 기초
[공간정보연구원] 1일차 - QGIS 개요 및 기초[공간정보연구원] 1일차 - QGIS 개요 및 기초
[공간정보연구원] 1일차 - QGIS 개요 및 기초
 
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
 
공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정
 
Web analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.comWeb analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.com
 
GIS
GISGIS
GIS
 
Gps ppt
Gps pptGps ppt
Gps ppt
 
지리정보체계(GIS) - [4] QGIS를 이용한 밀도 추정
지리정보체계(GIS) - [4] QGIS를 이용한 밀도 추정 지리정보체계(GIS) - [4] QGIS를 이용한 밀도 추정
지리정보체계(GIS) - [4] QGIS를 이용한 밀도 추정
 
Gis Day Presentation 2010 - ACCC - Expanded Version
Gis Day Presentation 2010 - ACCC - Expanded VersionGis Day Presentation 2010 - ACCC - Expanded Version
Gis Day Presentation 2010 - ACCC - Expanded Version
 
공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습공간SQL을 이용한 공간자료분석 기초실습
공간SQL을 이용한 공간자료분석 기초실습
 
Geocoding for beginners
Geocoding for beginnersGeocoding for beginners
Geocoding for beginners
 
Evolution of GPS
Evolution of GPSEvolution of GPS
Evolution of GPS
 
공간데이터베이스(Spatial db)
공간데이터베이스(Spatial db)공간데이터베이스(Spatial db)
공간데이터베이스(Spatial db)
 

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 App
Steven 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
 
Explain this!
Explain this!Explain this!
Explain this!
Fabio Telles Rodriguez
 
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
Fabio Telles Rodriguez
 
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
Jorge 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 Android
The European GNSS Agency (GSA)
 
ANEL GROUP - BIM Implementation
ANEL GROUP - BIM Implementation ANEL GROUP - BIM Implementation
ANEL GROUP - BIM Implementation
Cesare Caoduro
 
Polardb percona-19
Polardb percona-19Polardb percona-19
Polardb percona-19
宗志 陈
 
Geo django
Geo djangoGeo django
Geo django
Koh 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.pdf
cookie1969
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech Projects
Jody Garnett
 
Scaling PostreSQL with Stado
Scaling PostreSQL with StadoScaling PostreSQL with Stado
Scaling PostreSQL with Stado
Jim Mlodgenski
 
Optimization based Chassis Design
Optimization based Chassis DesignOptimization based Chassis Design
Optimization based Chassis Design
Altair
 
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 performance
Guy Harrison
 
[D15] 最強にスケーラブルなカラムナーDBよ、Hadoopとのタッグでビッグデータの地平を目指せ!by Daisuke Hirama
[D15] 最強にスケーラブルなカラムナーDBよ、Hadoopとのタッグでビッグデータの地平を目指せ!by Daisuke Hirama[D15] 最強にスケーラブルなカラムナーDBよ、Hadoopとのタッグでビッグデータの地平を目指せ!by Daisuke Hirama
[D15] 最強にスケーラブルなカラムナーDBよ、Hadoopとのタッグでビッグデータの地平を目指せ!by Daisuke Hirama
Insight Technology, Inc.
 
Improving the performance of Odoo deployments
Improving the performance of Odoo deploymentsImproving the performance of Odoo deployments
Improving the performance of Odoo deployments
Odoo
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
Sidney Chen
 
Rails GIS Hacks
Rails GIS HacksRails GIS Hacks
Rails GIS Hacks
Satish lal Acharya
 

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
 
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
 
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
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
 
Rails GIS Hacks
Rails GIS HacksRails GIS Hacks
Rails GIS Hacks
 

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 + Docker
Steven Pousty
 
Introduction to PaaS for application developers
Introduction to PaaS for application developersIntroduction to PaaS for application developers
Introduction to PaaS for application developers
Steven 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 cloud
Steven Pousty
 
Workshop For pycon13
Workshop For pycon13Workshop For pycon13
Workshop For pycon13
Steven Pousty
 
Build a PaaS with OpenShift Origin
Build a PaaS with OpenShift OriginBuild a PaaS with OpenShift Origin
Build a PaaS with OpenShift Origin
Steven 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 ecosystem
Steven Pousty
 
Spatial script for MongoBoulder
Spatial script for MongoBoulderSpatial script for MongoBoulder
Spatial script for MongoBoulder
Steven 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 application
Steven Pousty
 
Spatial script for CIMA
Spatial script for CIMASpatial script for CIMA
Spatial script for CIMA
Steven 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 2012
Steven 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 2012
Steven 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 Zend
Steven Pousty
 
Spatial mongo for PHP and Zend
Spatial mongo for PHP and ZendSpatial mongo for PHP and Zend
Spatial mongo for PHP and Zend
Steven 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 Management
Steven Pousty
 
Open shift intro for Philly PUG
Open shift intro for Philly PUGOpen shift intro for Philly PUG
Open shift intro for Philly PUG
Steven Pousty
 
Open shift intro for Philly PUG
Open shift intro for Philly PUGOpen shift intro for Philly PUG
Open shift intro for Philly PUG
Steven Pousty
 
Script for the geomeetup presentation
Script for the geomeetup presentationScript for the geomeetup presentation
Script for the geomeetup presentation
Steven Pousty
 
Openshift GeoSpatial Capabilities
Openshift GeoSpatial CapabilitiesOpenshift GeoSpatial Capabilities
Openshift GeoSpatial Capabilities
Steven 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 file
Steven Pousty
 
Mongo sf spatialmongo
Mongo sf spatialmongoMongo sf spatialmongo
Mongo sf spatialmongo
Steven 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

WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
aslasdfmkhan4750
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and OllamaTirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Zilliz
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
Priyanka Aash
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
bhumivarma35300
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Bert Blevins
 
Applying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAI
Applying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAIApplying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAI
Applying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAI
ssuserd4e0d2
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
maigasapphire
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
Lidia A.
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSECHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
kumarjarun2010
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
SynapseIndia
 
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdfARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
Inglês no Mundo Digital
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Muhammad Ali
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 

Recently uploaded (20)

WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
High Profile Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class ...
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and OllamaTirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
Tirana Tech Meetup - Agentic RAG with Milvus, Llama3 and Ollama
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
(CISOPlatform Summit & SACON 2024) Digital Personal Data Protection Act.pdf
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
 
Applying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAI
Applying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAIApplying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAI
Applying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAI
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSECHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
 
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdfARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
Litestack talk at Brighton 2024 (Unleashing the power of SQLite for Ruby apps)
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 

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. Agenda What is PostGIS Installing Getting data and importing Using in an application ASK QUESTIONS ALL ALONG
  • 3. Assumptions about you Know PostgreSQL and SQL New to spatial analysis and PostGIS Mainly using a commercial mapping service for your base layers Interested in writing cool applications This will only be a short shallow introduction
  • 4.  
  • 5. What is PostGIS PostGIS adds support for geographic objects and geographic functions to PostgreSQL Points, Lines, Polygon, and Linear References Spatial function such as area, near, overlap, within, clip, and simplify
  • 6. Competitive Offerings MySQL – doesn’t really implement all the functions and it only deals with bounding boxes SQLServer – only in SQLServer2008 but supported on all editions Oracle Spatial – full featured and includes a broad range of client libraries DB2 and Sybase and Informix and Ingres ESRI’s SDE can use PostGIS as a DB
  • 7. Installing Other libraries you want Proj4.5 for projection GEOS 3.0 for spatial operations Windows – use the “application stack builder” There are RPMs on the PostGIS site – not always the latest You can use Synaptic for Ubuntu – not always the latest Build is really simple, as long as you have required libraries installed
  • 8. Other Steps Add the objects and functions from the provided SQL files Best practice is to make these into a template for future databases From there making DBs is easy cheesy
  • 9. Two more things you need to understand Almost there – I promise
  • 10.  
  • 11. Shapefiles when is a file not a file
  • 13.  
  • 14. More Projection Goodness EPSG (European Petroleum Survey Group) has a number for most projections and datum combinations deCarta, and those other no names, expect geographic coordinates with WGS84 datum EPSG:4326 Geographic coordinates system with WGS84 datum. Degrees are not constant distance as you move North and South Not very accurate for distance and area calcs except over small areas You want to use projected layers (or project on the fly) for area and distance calcs
  • 15. Projecting using ogr2ogr Assuming there is a .prj file you need to find your output projection http://Spatialreference.org ogr2ogr -t_srs EPSG:4326 -f &quot;ESRI Shapefile&quot; water_bodies_gcs.shp water_bodies.shp
  • 16. Now let’s make some SQL Shp2pgsql is a command-line utility to take a shapefile to a SQL file The geometry field is called the_geom shp2pgsql.exe -s 4326 -I C:ataater_bodies_gcs.shp waterbodies > C:ataaterbodies.sql
  • 17. Y’all know what to do with SQL psql -q -U postgres -f C:ataaterbodies.sql kerncounty With lots-o-features you want to use –q option to prevent spamming your terminal
  • 18.  
  • 19. Let’s get this party started SELECT gid, the_geom FROM waterbodies WHERE gid = 2; gid | the_geom -----+------------------------------------------------------------------------------------------------------------------------ 2 | 106000020E6100000010000000103000000010000002E00000002CB8FC170C65DC06200F8D0E7B341408625910970C65DC0DE898BCAE7B3414053748B1A6FC65DC0199092E7E6B34140576BAFCB6EC65DC07815C607E6B34140926B64A66EC65DC0D0D11854E4B34140CA783CC66EC65DC091477CD7E2B34140FD8B372B6FC65DC02D75F091E1B341400748F1756FC65DC02C1C7C06E0B34140A0CBF8846FC65DC01B057AC2DEB34140BD6BDE586FC65DC036C25B1ADEB34140E73E8FBC6EC65DC051B6DE2DDDB3414037EFA3B86DC65DC0A6E75E4DDCB34140EECF5AF16CC65DC007312311DBB341405304E1D16CC65DC0C653541FDAB34140B352AB826CC65DC06800DD22D9B34140FDECCB8C6CC65DC0A8D8188ED7B3414028DA62606DC65DC03020AA9DD5B341401345D79D6EC65DC045CF8743D5B3414039BFF5A56FC65DC071F2D61AD6B34140D4391F4E70C65DC01F041E4CD7B34140FD50463A70C65DC0534507A5D8B3414087FB5FFA6FC65DC0C436FF22DAB3414092BF83B46FC65DC05EEC9961DBB34140456F69BC6FC65DC0E74915C3DCB34140DCCD550170C65DC022859B35DEB34140A929A59870C65DC014E6EA42DFB34140D7388A8E70C65DC0B2B22CD4DFB341405EA0F73270C65DC0E92146C4E0B341402EC4B3DE6FC65DC066AD87D3E1B3414083B732D26FC65DC0583D9907E3B3414017F8104E70C65DC07C37AB39E4B341404DFB09DA70C65DC0AB6838C7E4B341404E376F4871C65DC0D88F88EAE4B34140E290F4CC71C65DC04318C2B1E4B34140B2B1373672C65DC001CD36A7E3B3414094289CBD72C65DC032BF27F1E2B34140551D1E3773C65DC053E9A4C1E2B34140B247EEC273C65DC03C50B08FE3B34140EFFF2CD573C65DC0849F2D84E4B34140BB03E9A973C65DC0D397181FE5B341406292782B73C65DC0103A5EA9E5B34140B2EB752172C65DC0E72BDC89E5B341407818E39771C65DC0978C430BE6B34140AAE00CA471C65DC0E6C241AEE6B341405DD5367B71C65DC050325840E7B3414002CB8FC170C65DC06200F8D0E7B34140 WTF!
  • 20. Well Known Text (WKT) SELECT gid, asText(the_geom) AS Geometry FROM waterbodies WHERE gid = 2; gid | geometry -----+------------------------------------------------------------------------------------------------------------------ 2 | MULTIPOLYGON(((-119.100632086203 35.4055119715638,-119.100588218445 35.4055112058011,-119.100531231104 35.4054841485633,-119.100512429531 35.4054574696738,-119.100503538195 35.4054055329503,-119.100511130385 35.4053601605257,-119.100535206075 35.405321352397,-119.100553022028 35.405274210549,-119.100556605305 35.4052355857659,-119.100546090324 35.4052155445137,-119.100508823288 35.4051873528921,-119.100446853726 35.4051605904963,-119.100399340328 35.4051228925546,-119.100391835921 35.4050940667872,-119.100372950847 35.4050639704809,-119.100375365397 35.405015718586,-119.100425812278 35.4049565392201,-119.10050149939 35.4049457944043,-119.100564470279 35.4049714612528,-119.100604563231 35.4050078531802,-119.100599831265 35.4050489697935,-119.100584596379 35.4050945039903,-119.100567940388 35.4051324845866,-119.1005698232335.4051746229123,-119.10058625583 35.4052187928558,-119.100622330944 35.4052508971182,-119.100619921668 35.4052682131054,-19.100598089049 35.4052968351787,-119.100577998689 35.4053291714179,-119.100575017479 35.4053658960572,-119.100604549953 35.405402382471,-119.100637922046 35.4054192567285,-119.100664242372 35.4054234663778,-119.100695837816 35.4054166982392,-119.100720934285 35.4053849237043,-119.100753214358 35.4053632206036,-119.100782184037 35.405357556842,-119.100815518089 35.4053821192651,-119.100819868035 35.4054112646836,-119.10080955272 35.4054297323306,-119.100779407259 35.4054462156383,-119.100715985448 35.4054424595886,-119.100683185361 35.405457885726,-119.100686085296 35.4054773160076,-119.100676349209 35.4054947310111,-119.100632086203 35.4055119715638)))
  • 21. Lesson Learned Ask for your responses in Text format when you want to know what is going on eWKT includes the projection information 'SRID=4326;MULTIPOLYGON(((-119.5 35.0, -119.0 35.0, -119.0 35.5, -119.5 35.5, -119.5 35.0)))' asKML, asSVG, or asGML SELECT asKML(the_geom) FROM watercourses WHERE gid = 17;
  • 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. Inserting a new record Projection has to match INSERT INTO firestations(station_na, the_geom) VALUES('Best LittleFire House in CA', ST_SetSRID(ST_MakePoint(-119.5, 34.5), 4326) );
  • 24. Select using the geometry
  • 25.  
  • 26. Distance In units of the underlying coverage SELECT gid FROM waterbodies WHERE ST_DWithin('SRID=4326;POINT (-119.103762382096 35.4122898449297)', the_geom, 0.005); gid ----- 4 5 6 7 8
  • 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. Simplifying geometries Most geometries have more information than you can display There are algorithms for weeding out points Trade-off retaining “shape” versus less points
  • 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. So how do you bring this together in an app Never send 3000 pts to the browser Putting your information in a DB gives you way more control over what you return and display http://demo.decarta.com/opensearchservice/index.html
  • 43. Where do you go now - PostGIS Home http://postgis.refractions.net/ Tools to use with PostGIS http://postgis.refractions.net/support/wiki/index.php?ToolsSupportPostgis Good support Wiki http://postgis.refractions.net/support/wiki/ Another Introduction http://www.mapbender.org/presentations/Spatial_Data_Management_Arnulf_Christl/Spatial_Data_Management_Arnulf_Christl.pdf Great OS-GEO resources http://www.bostongis.com/ PostGIS specific http://www.bostongis.com/postgis_quickguide.bqg?outputformat=PDF Nice GIS on a Stick for Windows http://www.archaeogeek.com/blog/portable-gis /
  • 44. Where to get Data Kern County http://www.co.kern.ca.us/gis/downloads.asp California http://gis.ca.gov/casil/ US Census http://www.census.gov/geo/www/tiger/ Some UN http://www.grida.no/gis/index.htm http://www.geographynetwork.com/ http://gos2.geodata.gov/wps/portal/gos Open source Data http://www.fortiusone.com/ OSM http:// wiki.openstreetmap.org/index.php/Planet.osm http://code.google.com/p/osm2shp/
  • 45. Map API to use http://developer.decarta.com Free to develop – sign up and be mapping and mashing within 12 hours If you want a web page with JavaScript look at the JavaScript API If you want to use Web Services then look at the web services area on the left
  • 46.