script for inserting all the procedures

35 views
Skip to first unread message

maurice Libes

unread,
Jun 23, 2021, 12:54:06 PM6/23/21
to istSOS

hello

in the documentation : http://istsos.org/en/latest/doc/ws_registersensor.html

I read :

>In order to speed up the “boring” process of inserting all the other procedures we have >prepared a script. Open a terminal and run:

>cd ~/Desktop/Tutorial python fill/execute.py

but I do not find this script ? which may be interesting

sorry if I miss something

many thanks
Maurice

Milan A.

unread,
May 23, 2022, 12:43:54 PM5/23/22
to istSOS
Hi Maurice

This script is located into the tutorial files that you can download from here:

But you can find also a script into the istSOS src/install folder. In the script directory there is the registercsv.py file that can be used to make a bulk sensor registration.

This script register new procedures importing data from a csv file
containing the followings columns:

1.  name
2.  description
3.  keyword
4.  long name
5.  modelNumber
6.  manufacturer
7.  sensorType
8.  foi-epsg
9.  foi-coordinates
10. foi-name
11,12,13. observed property (uri style)
14. uom
15. begin position
16. end position
17. resolution
18. acquisition interval
19. quality index - lower bound
20. quality index - upper bound

separated with a semi column symbol ";"

See attachment for an example.

To see the help:

cd TO/IST/SOS/FOLDER
python scripts/registercsv.py -h

To run the script and register a CSV full of sensors:

cd TO/IST/SOS/FOLDER
python scripts/registercsv.py \
  -u https://YOURSERVER.COM/istsos \
  -s sosraw -c /home/USERNAME/Downloads/example.csv

Or if istSOS is password protected:

cd TO/IST/SOS/FOLDER
python scripts/registercsv.py \
  -u https://YOURSERVER.COM/istsos \
  -user YOUR_USERNAME \
  -password YOUR_PASSWORD \
  -s sos -c /home/USERNAME/Downloads/example.csv

Best regards

Milan
example.csv
Reply all
Reply to author
Forward
0 new messages