../../_images/logo_istsos.png ../../_images/OSGeo_community.png

istSOS Quickstart

istSOS is an OGC Sensor Observation Service (SOS) server implementation written in Python. istSOS allows for managing and dispatch observations from monitoring sensors according to the Sensor Observation Service standard.

The project provides also a Graphical user Interface that allows for easing the daily operations and a RESTFull Web api for automatizing administration procedures.

istSOS is released under the GPLv2 licence, and runs on all major platforms (Windows, Linux, Mac OS X), even though it has been used in production in linux environment only.

Create postgis database

Open a terminal and execute the following commands:

sudo -u postgres createdb -E UTF8 istsos
sudo -u postgres psql -d istsos -c 'CREATE EXTENSION postgis'

Set up an istSOS service instance

With istSOS you can organize your sensor data in different instances. Every instance has its own database schema independent from other instances. You can even deploy other databases over your network according to your needs.

The first steps into istSOS setup is to configure the default configuration options. These options will then be automatically used for your convenience by every new istSOS instance created.

  1. Click Geospatial ‣ Webservices ‣ istSOS to open the Web Admin interface. Alternatively, open a browser and go to http://localhost/istsos/admin

  2. Click the Enter button in the administration page.

  3. Configure your database connection. From the toolbar buttons menu, press the “Database” button and fill in the database configuration options:

    user: postgres
    password: postgres
    host: localhost
    port: 5432
    DB name: istsos
    
  4. Press the “Service provider” button and fill it using your institutional information.

  5. Press the “Service identification” button and fill up with custom metadata that describe the service usage.

  6. Press the “Coordinates system” button to manage the Coordinate Reference System (CRS).

    • Default EPSG code: this will be the native Coordinate Reference System of your geometries in the database.

    • Permitted EPSG: here you can configure which other Coordinate Reference Systems your system will support and reproject if requested.

  7. From the toolbar buttons menu, press the “GetObservation Configuration” button to set maximum time interval per getObservation request (zero for no limits) and aggregation no-data value.

  8. Configure your service proxy address. The Proxy URL field is the base URL seen beyond a reverse proxy.

Create a new service

Now that you have configured istSOS, it’s time to create a new service instance.

  1. From the toolbar buttons menu press the “new service” button and click Next.

  2. Type demo for the Service name.

  3. In the EPSG field you can set the database native projection. Leave it empty to use the default. Click Next.

  4. Clicking on the “Customize database” box, you are able to change the default database configuration for this new istSOS instance.

  5. Press Next. The server status panel is displayed. If something’s gone wrong during the creation you will see an alert here.

Note

The istSOS “demo” instance has inherited all the configuration options from the default configuration. If, for any reason you decide to modify them, the changes will affect only this instance.

Add a new procedure

  1. From the “services” drop down button of the admin interface (http://localhost/istsos/admin ) choose the desired instance.

  2. From the toolbar buttons menu press the New procedure button.

  3. Fill in the form using appropriate information.

Warning

Once a procedure is created the outputs (observed properties) cannot be changed.

Note

Optional parameters: Fill at your own need and willing

Example (minimal configuration)

Name: T_LUGANO

Description: temperature weather station in Lugano

Keywords: weather, meteorological, IST

System type: insitu-fixed-point

Sensor type: PTC thermistors of the “switching” type

FOI name: LUGANO

EPSG: 4326

Coordinates: x: 8.96127 y: 46.02723 z: 344.1

Outputs (confirm the outputs pressing the “add” button):

Observed property: urn:ogc:def:parameter:x-istsos:1.0:meteo:air:temperature

Unit of measure: °C

Description (optional): conversion from resistance to tempera

quality index check (optional): Between / from -40 to +60

Note

Register the new sensor (procedure) pressing the “submit” button.

Add new observations

First we will create a text file with sensor data, formatted according to “text/csv, subtype=istSOS”. The file uses a Comma Separated Values (CSV) format. The first line contains header information, including URI names of the observed properties. The following lines contain the data.

  1. Open a text editor by selecting Accessories ‣ FeatherPad.

  2. Copy and paste the following text into the text editor window:

    urn:ogc:def:parameter:x-istsos:1.0:time:iso8601,urn:ogc:def:parameter:x-istsos:1.0:meteo:air:temperature
    2014-06-03T14:30:00.00Z,22.20
    2014-06-03T14:40:00.00Z,22.00
    2014-06-03T14:50:00.00Z,21.70
    2014-06-03T15:00:00.00Z,21.20
    2014-06-03T15:10:00.00Z,20.70
    2014-06-03T15:20:00.00Z,20.20
    2014-06-03T15:30:00.00Z,19.60
    2014-06-03T15:40:00.00Z,19.20
    2014-06-03T15:50:00.00Z,18.20
    2014-06-03T16:00:00.00Z,18.00
    2014-06-03T16:10:00.00Z,17.20
    
  3. Save the file as “T_LUGANO_20140603161000000.dat” on the Desktop. The filename convention being used is: PROCEDURENAME_YYYYMMDDhhmmssfff.dat

  4. Open a terminal by selecting System Tools ‣ LXTerminal.

  5. In the terminal, enter: “cd /usr/share/istsos/” and press ENTER.

  6. Write “python scripts/csv2istsos.py -p T_LUGANO -u http://localhost/istsos -s demo -w ~/Desktop” and press ENTER

  7. You should see a message “Insert observation success: True”

  8. Click Geospatial ‣ Webservices ‣ istSOS.

  9. Click the Enter button in the administration page

  10. Click Data Management ‣ Data Viewer.

  11. Select the following:
    • Service = demo

    • Offering = temporary

    • Procedure T_LUGANO

  12. Click the Add button

  13. Click the Plot button and check that the data have been added (watch out at your time zone!)

../../_images/istsos_viewer.png

What next?

To learn more about istSOS, a starting point is the istSOS Documentation and the istSOS Tutorial.