PostGIS Introduction

From Seven
Revision as of 15:58, 3 October 2012 by Seven (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
PostGIS Logo

These are the presentation notes for the EuroSDR PostGIS Workshop in Southampton given on 2012-05-24.

Contents

Overview

What is PostGIS? It's all greek to me.

  • A really old presentation ((PDF from 2005)), just to show how sustainable and stable the community around this software project is.

Some peeks into How to Hack geometry with PostGIS

No fear

Now, on to the Command Line.

postgres# psql -d plz

Get the whole thing:

SELECT * FROM test2 WHERE plz99 = '53111';

Get the bounding box for just one post code area:

SELECT st_box(the_geom) FROM test2 WHERE plz99 = '53111';

Get the geometry of that post code area as a redable text:

SELECT st_asewkt(the_geom) FROM test2 WHERE plz99 = '53111';

Get the geometry of that post code area as GML, KML, GeoJson, name it:

SELECT st_asgeojson(the_geom) FROM test2 WHERE plz99 = '53111';

List some functions

\df buff*
\df inters*

Put a buffer of 0.02 degrees around that post code area:

SELECT st_asewkt(st_buffer(the_geom,0.02)) FROM test2 WHERE plz99 = '53111';

Put this into a view:

CREATE OR REPLACE VIEW plz_buffered ( gid, the_geom, plz99 ) 
AS 
SELECT gid, st_buffer(the_geom, 0.02), plz99 FROM test2 WHERE plz99 = '53111';

Intersects this with the other post code areas, ...

AND SO ON...

Show in Quantum GIS

  • Load GIS data table from PostgreSQL/PostGIS
  • Show QueryBuilder
  • Load GIS data view from PostgreSQL/PostGIS
  • Modify View with psql (enlarge buffer)
CREATE OR REPLACE VIEW plz_buffered ( gid, the_geom, plz99 ) 
AS 
SELECT gid, st_buffer(the_geom, 0.03), plz99 FROM test2 WHERE plz99 = '53111';
* Show results in Quantum GIS

Some more PostGIS History

Releases

Support

Early it was a bit difficult to find someone / or - it was rather easy, you just have to know them folks.

Insights into the development process

Directions the software is taking

OSGeo Incubation

What is this? It is a set of rules set up by a diverse set of OSGeo members over the past years defining what an Open Source project has to offer to become a high quality OSGeo branded product.

Insight into the governance of PostGIS

PostGIS is run by a highly capable group of people. The Incubation process required them to document the way they went about things. It is all documented:

How PostGIS ties in with other OSGeo software?

  • PostGIS is supported by most serious Open Source implementations.
  • Support by proprietary vendors
    • Autodesk
    • Esri (watch out that you "click the PostGIS tick", else you might end up using PostgreSQL Blobs only.)
    • ...many others

Performance Comparisons


Thank you for your attention.