These are the presentation notes for the EuroSDR PostGIS Workshop in Southampton given on 2012-05-24.
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
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
- First tries with PostgreSQL geometries showed that relational mapping does not scale
- Therefore they implemented a specific data type Geometry (and later Topological Geomnetry)
- Since inception: http://www.opengeospatial.org/standards/sfs/
- Later SQL/MM
- First release in May 2001
- 0.7.4 – February 13, 2003 (This is when I started using PostGIS and what the Introduction Tutorial to PostGIS linked from above is based on (Mon 07 Nov 2005 07:57:28 PM CET)
Early it was a bit difficult to find someone / or - it was rather easy, you just have to know them folks.
- Now there is a web site:
Insights into the development process
Directions the software is taking
- Topology and Graphs
- http://2010.foss4g.org/presentations_show.php?id=3555 (local PDF)
- PostGIS 2.0
- A great set of slides showing the highlights of PostGIS 2-0 by Paul Ramsey is available at http://s3.cleverelephant.ca/foss4gna2012-postgis2.pdf
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.
- Graduation on May 21, 2012: Hooray! \o/
- Formal graduation still outstanding, will happen at the next OSGeo Board of Directors meeting on May 7th
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:
- and so on...
How PostGIS ties in with other OSGeo software?
- PostGIS is supported by most serious Open Source implementations.
- MapServer example
- Quantum GIS example
- Check out the OSGeo Live DVD
- Support by proprietary vendors
- Esri (watch out that you "click the PostGIS tick", else you might end up using PostgreSQL Blobs only.)
- ...many others
- Read Paul's Blog: http://blog.cleverelephant.ca/2012/02/postgis-vs-oracle-spatial.html
- Check out the annual FOSS4G WMS Shootout.
Thank you for your attention.