project logo

istSOS Quickstart

istSOS is sensor data management tool that allows collection, maintenance and publishing of monitoring observations using the Open Geospatial Consortium (OGC) Sensor Observation Service (SOS) standard.

This QuickStart describes how to:

  • Add new observations using a python script and the RestFul API.
  • View and edit data with the administration interface.

Add new observations

  1. 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 ‣ Leafpad.
    2. Copy and paste the follwing 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
    
    1. Save the file as “T_LUGANO_20140603161000000.dat” on the Desktop. The filename convention being used is: PROCEDURENAME_YYYYMMDDhhmmssfff.dat

    2. Open a terminal by selecting Accessories ‣ LXTerminal.

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

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

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

    6. Click Geospatial ‣ Webservices ‣ istSOS.

    7. Click the ENTER button in the administration page

    8. Click Data Management ‣ Data Viewer.

    9. Select the following:
      • Service = demo
      • Offering = temporary
      • Procedure T_LUGANO
    10. Click the Add button

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

../../_images/istsos_viewer.png

Edit data with the CALCULATOR

  1. Click Geospatial ‣ Webservices ‣ istSOS.

  2. Click Data Management ‣ Data Viewer.

  3. Select the following: Service = demo, Offering = temporary

  4. Select and add the following procedures: BELLINZONA​, LOCARNO​ and ​T_LUGANO

  5. On the right panel choose the Property: ​air­temperature

  6. Press “​Plot​”, the last week of measurements is loaded and displayed

  7. On the left panel select the “​Editor​” tab

  8. Select ​T_LUGANO​ from the combo list

  9. press “​Start editing​”, the grid is now displayed

  10. At the bottom­right corner of the chart there are 3 buttons “Day”, “Week” and “All”:

    • Click on “​Day​”, the chart is zoomed to contain only one day of data
    • Drag the timeline bar on the right where you will see that T_LUGANO has no data
  11. Click on the chart to select the last observation before the “​nodata​” hole, a green line is displayed and in the ​Editing Grid​ the corresponding row is selected.

  12. Now go to the ​”Editing Grid​” panel

    • Click the first row where data are ​NaN​,
    • Scroll to the last ​NaN​ record and holding the ​SHIFT​ Key click on it
    • The press the “​Calculator​” button

WIth the ​Calculator​ we are able to correct an interval of data in a single action. It is possible to set a numeric value or also use a function using data from the other loaded procedures. Let’s build a function that make the average of the data from BELLINZONA and LOCARNO and then removes two degrees:

((BELLINZONA+LOCARNO)/2)-2
  1. Copy the formula in the calculator and select the quality index as QI 500 (manually adjusted).
  2. Press the enter button and check your new data with gap filled (Press Save if yyou want to permanently save the updates in the database!)
../../_images/istsos_calculator.png

What Next?

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