SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
Building Location Aware Apps -
   Get Started with PostGIS

            PART I

          Lasma Sietinsone
       l.sietinsone@ed.ac.uk
Slides




  http://gismatic.com/dev8d/docs/
Who am I?

• Work for EDINA, University of Edinburgh
• GIS Technician & Database Engineer
• Manage UK data for online maps & services
  (approaching terabytes of data!)
• Provide geo-support for spatially enabled
  apps
My Aim?
• Stimulate your creative thinking!
• Give you an ability to integrate spatial technologies
  in your own stuff!

    Space is a natural join between otherwise
            seemingly unrelated things!

• Save you hours/days of faffing around on your own!
• Give you a kick for accelerated
learning of new technology!

           Hands-on!
      I MUST get you rolling
         independently!
Who are you?

• Who attended prep-workshop?
• Experience of audience:
  – SQL?
  – RDBMS?
  – OS?

• This demo requires:
  – SQL – basic knowledge (SELECT, UPDATE,
    DELETE) – check your cheat-sheet!
  – RDBMS – none
  – Windows but Mac OS, Linux will do too
Contents
1. Pre-workshop (Install and configure
   PostgreSQL 9.1 with PostGIS 1.5)


2. Some background (~15 mins)
3. Practical (1hr & 15 minutes):
  •   Import some data
  •   Use some PostGIS functions
  •   View data externally
  •   Demo with OpenStreetMap data to perform
      location based queries
4. Questions and answers (~15 mins)
What is PostgreSQL?

            • Proper object-relational
              database management system
            • Massive OS project
            • Super advanced
            • Fast!
            • Standard compliant
            • Well documented
            • Global user community
Advantages of a DBMS

• Data Independence from application
  programs
• Efficient Data Access
• Data Integrity and Security
• Centralized Data Administration
• Concurrent Access and Crash Recovery
• Reduced Application Development Time
  – common data access functions
PostGIS what?

PostGIS is a spatial extension to the
    PostgreSQL object-relational
 database that supports work with
          geographic data
PostGIS extension provides

• Geometry/geography data types for
  points, linestrings, polygons, curves,
  geometry collections, 3D geometries

• Use geometry to store object:
                 (A) shape
                 (B) centroid
                 (C) bounding box
PostGIS extension provides (cont.)

 • Spatial operators such as contains @,
   overlaps, intersects &&, same as =, is
   to the left/right/below/above

 • Loads of spatial functions
Spatial functions

 • Constructors
   e.g. ST_GeomFromText(), ST_MakePoint(),
     ST_MakePolygon
 • Output
   e.g. ST_AsGML(), ST_AsGeoJSON(), ST_AsBinary()
 • Accessors: getters and setters
   e.g. ST_Transform(), ST_GeometryType(),
     ST_IsValid(), ST_NPoints(), ST_SetDRID()
 • Measurement
   e.g. ST_Distance_Sphere(), ST_Length_2D(),
     ST_Perimeter(), ST_Azimuth()
Spatial functions (continued)

• Decomposition
  e.g. ST_Centroid(), ST_Box2D(), ST_Boundary(),
    ST_GeometryN(), ST_DumpRings()
• Composition
  e.g. ST_MakePoint(), ST_MakePolygon(),
    ST_BuildArea(), ST_Polygonize()
• Simplification
  e.g. ST_Simplify(), ST_SimplifyPreserveTopology(),
    ST_SnapToGrid()
Common workflow

1. Load/populate table
2. Add geometry column with certain
   dimensions and spatial reference
   system (SRS/SRID)
3. [Register geometry column in
   geometry_columns table]
4. Optimise performance by:
  – Creating spatial index
  – Clustering data based on spatial index
Common workflow (continued)

5. View/Edit/Query data with:
  – desktop GIS, e.g. QGIS, OpenJUMP,
    GRASS etc.
  – Web map servers, e.g. GeoServer,
    MapServer, Deegree etc.
  – Custom applications communicating via
    database connectors such as JDBC
Use online references

PostgreSQL docs *****
 http://www.postgresql.org/docs/9.0/interacti
 ve/index.html

PostGIS docs *****
 http://www.postgis.org/docs/

Weitere ähnliche Inhalte

Ähnlich wie Building Location Aware Apps with PostGIS

NAPSG 2010 Fire/EMS Conference - Data Sharing Basics
NAPSG 2010 Fire/EMS Conference - Data Sharing BasicsNAPSG 2010 Fire/EMS Conference - Data Sharing Basics
NAPSG 2010 Fire/EMS Conference - Data Sharing Basicspdituri
 
FOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesFOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesTodd Barr
 
Open source Geospatial Business Intelligence in action with GeoMondrian and S...
Open source Geospatial Business Intelligence in action with GeoMondrian and S...Open source Geospatial Business Intelligence in action with GeoMondrian and S...
Open source Geospatial Business Intelligence in action with GeoMondrian and S...Thierry Badard
 
GEOGRAPHICAL INFORMATION SYSTEM (GIS)
GEOGRAPHICAL INFORMATION SYSTEM (GIS)GEOGRAPHICAL INFORMATION SYSTEM (GIS)
GEOGRAPHICAL INFORMATION SYSTEM (GIS)subhashB10
 
Weave-D - 2nd Progress Evaluation Presentation
Weave-D - 2nd Progress Evaluation PresentationWeave-D - 2nd Progress Evaluation Presentation
Weave-D - 2nd Progress Evaluation Presentationlasinducharith
 
PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...
PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...
PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...HaNJiN Lee
 
Spatial decision support and analytics on a campus scale: bringing GIS, CAD, ...
Spatial decision support and analytics on a campus scale: bringing GIS, CAD, ...Spatial decision support and analytics on a campus scale: bringing GIS, CAD, ...
Spatial decision support and analytics on a campus scale: bringing GIS, CAD, ...Safe Software
 
Open Source Databases And Gis
Open Source Databases And GisOpen Source Databases And Gis
Open Source Databases And GisKudos S.A.S
 
Pycon 2012 Taiwan
Pycon 2012 TaiwanPycon 2012 Taiwan
Pycon 2012 TaiwanDongpo Deng
 
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
那些年 Python 攻佔了 GIS / The Year Python Takes Over GISpycontw
 
Saving Money with Open Source GIS
Saving Money with Open Source GISSaving Money with Open Source GIS
Saving Money with Open Source GISbryanluman
 
Be Location Intelligent with MapInfo Pro v2019
Be Location Intelligent with MapInfo Pro v2019Be Location Intelligent with MapInfo Pro v2019
Be Location Intelligent with MapInfo Pro v2019Peter Horsbøll Møller
 
PEARC17:A real-time machine learning and visualization framework for scientif...
PEARC17:A real-time machine learning and visualization framework for scientif...PEARC17:A real-time machine learning and visualization framework for scientif...
PEARC17:A real-time machine learning and visualization framework for scientif...Feng Li
 
Geographic information system
Geographic information systemGeographic information system
Geographic information systemOssamaElShanawany
 

Ähnlich wie Building Location Aware Apps with PostGIS (20)

NAPSG 2010 Fire/EMS Conference - Data Sharing Basics
NAPSG 2010 Fire/EMS Conference - Data Sharing BasicsNAPSG 2010 Fire/EMS Conference - Data Sharing Basics
NAPSG 2010 Fire/EMS Conference - Data Sharing Basics
 
Geoservices Activities at EDINA
Geoservices Activities at EDINAGeoservices Activities at EDINA
Geoservices Activities at EDINA
 
FOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesFOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for Rookies
 
Open source Geospatial Business Intelligence in action with GeoMondrian and S...
Open source Geospatial Business Intelligence in action with GeoMondrian and S...Open source Geospatial Business Intelligence in action with GeoMondrian and S...
Open source Geospatial Business Intelligence in action with GeoMondrian and S...
 
GEOGRAPHICAL INFORMATION SYSTEM (GIS)
GEOGRAPHICAL INFORMATION SYSTEM (GIS)GEOGRAPHICAL INFORMATION SYSTEM (GIS)
GEOGRAPHICAL INFORMATION SYSTEM (GIS)
 
Weave-D - 2nd Progress Evaluation Presentation
Weave-D - 2nd Progress Evaluation PresentationWeave-D - 2nd Progress Evaluation Presentation
Weave-D - 2nd Progress Evaluation Presentation
 
PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...
PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...
PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...
 
Spatial decision support and analytics on a campus scale: bringing GIS, CAD, ...
Spatial decision support and analytics on a campus scale: bringing GIS, CAD, ...Spatial decision support and analytics on a campus scale: bringing GIS, CAD, ...
Spatial decision support and analytics on a campus scale: bringing GIS, CAD, ...
 
Post gispguk
Post gispgukPost gispguk
Post gispguk
 
Open Source Databases And Gis
Open Source Databases And GisOpen Source Databases And Gis
Open Source Databases And Gis
 
Mobile LBS
Mobile LBSMobile LBS
Mobile LBS
 
design_doc
design_docdesign_doc
design_doc
 
State of JTS 2018
State of JTS 2018State of JTS 2018
State of JTS 2018
 
Pycon 2012 Taiwan
Pycon 2012 TaiwanPycon 2012 Taiwan
Pycon 2012 Taiwan
 
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
那些年 Python 攻佔了 GIS / The Year Python Takes Over GIS
 
Making Sense of Remote Sensing
Making Sense of Remote SensingMaking Sense of Remote Sensing
Making Sense of Remote Sensing
 
Saving Money with Open Source GIS
Saving Money with Open Source GISSaving Money with Open Source GIS
Saving Money with Open Source GIS
 
Be Location Intelligent with MapInfo Pro v2019
Be Location Intelligent with MapInfo Pro v2019Be Location Intelligent with MapInfo Pro v2019
Be Location Intelligent with MapInfo Pro v2019
 
PEARC17:A real-time machine learning and visualization framework for scientif...
PEARC17:A real-time machine learning and visualization framework for scientif...PEARC17:A real-time machine learning and visualization framework for scientif...
PEARC17:A real-time machine learning and visualization framework for scientif...
 
Geographic information system
Geographic information systemGeographic information system
Geographic information system
 

Kürzlich hochgeladen

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
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
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Kürzlich hochgeladen (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
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
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Building Location Aware Apps with PostGIS

  • 1. Building Location Aware Apps - Get Started with PostGIS PART I Lasma Sietinsone l.sietinsone@ed.ac.uk
  • 3. Who am I? • Work for EDINA, University of Edinburgh • GIS Technician & Database Engineer • Manage UK data for online maps & services (approaching terabytes of data!) • Provide geo-support for spatially enabled apps
  • 4. My Aim? • Stimulate your creative thinking! • Give you an ability to integrate spatial technologies in your own stuff! Space is a natural join between otherwise seemingly unrelated things! • Save you hours/days of faffing around on your own! • Give you a kick for accelerated learning of new technology! Hands-on! I MUST get you rolling independently!
  • 5. Who are you? • Who attended prep-workshop? • Experience of audience: – SQL? – RDBMS? – OS? • This demo requires: – SQL – basic knowledge (SELECT, UPDATE, DELETE) – check your cheat-sheet! – RDBMS – none – Windows but Mac OS, Linux will do too
  • 6. Contents 1. Pre-workshop (Install and configure PostgreSQL 9.1 with PostGIS 1.5) 2. Some background (~15 mins) 3. Practical (1hr & 15 minutes): • Import some data • Use some PostGIS functions • View data externally • Demo with OpenStreetMap data to perform location based queries 4. Questions and answers (~15 mins)
  • 7. What is PostgreSQL? • Proper object-relational database management system • Massive OS project • Super advanced • Fast! • Standard compliant • Well documented • Global user community
  • 8. Advantages of a DBMS • Data Independence from application programs • Efficient Data Access • Data Integrity and Security • Centralized Data Administration • Concurrent Access and Crash Recovery • Reduced Application Development Time – common data access functions
  • 9. PostGIS what? PostGIS is a spatial extension to the PostgreSQL object-relational database that supports work with geographic data
  • 10. PostGIS extension provides • Geometry/geography data types for points, linestrings, polygons, curves, geometry collections, 3D geometries • Use geometry to store object: (A) shape (B) centroid (C) bounding box
  • 11. PostGIS extension provides (cont.) • Spatial operators such as contains @, overlaps, intersects &&, same as =, is to the left/right/below/above • Loads of spatial functions
  • 12. Spatial functions • Constructors e.g. ST_GeomFromText(), ST_MakePoint(), ST_MakePolygon • Output e.g. ST_AsGML(), ST_AsGeoJSON(), ST_AsBinary() • Accessors: getters and setters e.g. ST_Transform(), ST_GeometryType(), ST_IsValid(), ST_NPoints(), ST_SetDRID() • Measurement e.g. ST_Distance_Sphere(), ST_Length_2D(), ST_Perimeter(), ST_Azimuth()
  • 13. Spatial functions (continued) • Decomposition e.g. ST_Centroid(), ST_Box2D(), ST_Boundary(), ST_GeometryN(), ST_DumpRings() • Composition e.g. ST_MakePoint(), ST_MakePolygon(), ST_BuildArea(), ST_Polygonize() • Simplification e.g. ST_Simplify(), ST_SimplifyPreserveTopology(), ST_SnapToGrid()
  • 14. Common workflow 1. Load/populate table 2. Add geometry column with certain dimensions and spatial reference system (SRS/SRID) 3. [Register geometry column in geometry_columns table] 4. Optimise performance by: – Creating spatial index – Clustering data based on spatial index
  • 15. Common workflow (continued) 5. View/Edit/Query data with: – desktop GIS, e.g. QGIS, OpenJUMP, GRASS etc. – Web map servers, e.g. GeoServer, MapServer, Deegree etc. – Custom applications communicating via database connectors such as JDBC
  • 16. Use online references PostgreSQL docs ***** http://www.postgresql.org/docs/9.0/interacti ve/index.html PostGIS docs ***** http://www.postgis.org/docs/