Skip to content

Example

Ondrej Pesek edited this page Sep 7, 2017 · 10 revisions

What do we want to do?

We have sensors in the field - in Trondheim, Prague and Torino. Every of them is used for different offerings:

  • Trondheim: Offerings høydegradient and lemenplott
  • Prague: Only offering lemenplott
  • Torino: Only offering templogstasjoner

We have our server with address http://ninistsos01.nina.no/istsos/ which we can modify from address http://ninistsos01.nina.no/istsos/admin/. We have received our data (see them in the demo folder) and now we would like to upload them on our istSOS server to work with them.


Workflow

Clone this repository

We can clone this repository simply by this command ran from your desired folder:

git clone https://github.com/NINAnor/istSOS-support.git

Go to the new directory istSOS-support. Mostly:

cd istSOS-support

All mentioned scripts will be run from this directory.

Server preparation

Firstly, we have to set up our server. Create our desired service (demo), upload our procedures and match them with our offerings (hoydegradient, lemenplott and templogstasjoner).

New service

You can create new service on the address http://ninistsos01.nina.no/istsos/admin/. Just enter, go to the New service tab and insert name demo and a desired EPSG (32632 for Norway). Then you should see this in the status tab:

NOTE: If you can see the demo offering even before you start, just go to the Delete service tab and delete it or you can create another.

Procedures upload

Because our procedures contain not standardized observed properties, we have to make the server ready for them.

From the services combobox choose the desired service (demo) and go to the Observed properties tab.

There just click New and fill it as you need to. In our case, we need to create Temperature and RH properties (you can find them in INDEX.SWD files).

Now you can finally import your procedures.
Just run this command:

python procedures2istsos.py -path=demo/demo-sample-service/ -url=http://ninistsos01.nina.no/istsos/ -service=demo -device_type=templogger -geometry_index=metadata/geometry_index_templogger.csv 

Then you should see something like this in your Procedures tab:

New offerings and association with procedures

Go to the Offerings tab.

There just click New and fill it as you need to. In our case, we need to create hoydegradient, lemenplott and templogstasjoner.
For example hoydegradient offering import looks like this:

After all three imports, you should see this:

Now the last thing before we can upload our measurings. Associate procedures with corresponding offerings. You can do it in the Offerings undertab Offering-procedure memberships. There just select your desired offering and using typical drag&drop technique move procedures from Not members to the left side. Which procedure is in which offering can be found again in the example data, procedures is presented as a folder in an offering directory.

Then you should see this in the Offerings undertab:

Data upload

Finally, let's feed the server. For this final process, you do not need anything else than just run this command:

python data2istsos.py -path=demo/demo-sample-service/ -device_type=templogger -url=http://ninistsos01.nina.no/istsos/ -service=demo -device_type=templogger -geometry_index=metadata/geometry_index_templogger.csv -u -f

If there doesn't occur any error messages, everything ran smoothly. We are free to visualize or work with data any way we want.