Introduction

By enabling the Postgres plugin, you gain access to Clowder's Geostreams API. This module supports definition of Sensors, Streams and Datapoints in Clowder that allow for geospatial visualization and querying. 

 

Installation

  1. Install Postgres 
    1. https://wiki.postgresql.org/wiki/Detailed_installation_guides
  2. Initialize the PostGIS database using SQL script in Clowder repository
    1. https://opensource.ncsa.illinois.edu/bitbucket/projects/CATS/repos/clowder/browse/geostream.sql
    2. psql -d clowder -f clowder/geostream.sql
  3. Enable Postgres plugin in Clowder
    1. In clowder/custom/play.plugins include the line:
      10502:services.PostgresPlugin

Once installed you should see a "Sensors" entry in the top menu of Clowder, alongside "Help".

 

Customization

The following values can be changed in clowder/custom/custom.conf.

Postgres user configuration:

Location where data for geostream API calls will be cached:

These properties are used when the geostreaming service returns data as type CSV instead of JSON:


Geography vs. Geometry

PostGIS offers two spatial types, "geometry" and "geography".

 

So why choose one over the other?

Further reading:

http://workshops.boundlessgeo.com/postgis-intro/geography.html

http://gis.stackexchange.com/questions/6681/what-are-the-pros-and-cons-of-postgis-geography-and-geometry-types

https://gis.stackexchange.com/questions/26082/what-is-the-difference-between-geometric-and-geographic-columns