walib.istsos.services.procedures package

Submodules

walib.istsos.services.procedures.procedures module

class walib.istsos.services.procedures.procedures.waGetGeoJson(waEnviron)

Bases: walib.resource.waResourceService

Class to execute istsos/services/{serviceName}/procedures/operations/geojson/{epsg}

executeGet()
setData(data)

Set data in response

class walib.istsos.services.procedures.procedures.waGetlist(waEnviron)

Bases: walib.resource.waResourceService

Class to execute istsos/services/{serviceName}/procedures/operations/getlist

executeGet()
class walib.istsos.services.procedures.procedures.waProcedures(waEnviron)

Bases: walib.resource.waResourceService

class to handle SOS service objects, support GET and POST method

executeDelete()

Method for executing a DELETE requests that erase a SOS procedure

@note: This method delete:
  1. the given procedure
executeGet()

Method for executing a GET requests that rename a SOS service

{

“message”: “Sensor Description secessfully loaded”, “total”: 1, “data”: {

“inputs”: [], “description”: “”, “classification”: [

{
“definition”: “urn:ogc:def:classifier:x-istsos:1.0:systemType”, “name”: “System Type”, “value”: “insitu-fixed-point”

}, {

“definition”: “urn:ogc:def:classifier:x-istsos:1.0:sensorType”, “name”: “Sensor Type”, “value”: “temperature”

}

], “characteristics”: “”, “interfaces”: “”, “keywords”: “”, “contacts”: [], “assignedSensorId”: “ec08e1f51ab879f4e1796f3c187daff6”, “documentation”: [], “system”: “DEMO_1”, “capabilities”: [], “identification”: [], “location”: {

“geometry”: {

“type”: “Point”, “coordinates”: [

“8.88”, “45.45”

]

}, “crs”: {

“type”: “name”, “properties”: {

“name”: “4326”

}

}, “type”: “Feature”, “properties”: {

“name”: “lugano”

}

}, “outputs”: [

{

“definition”: “urn:ogc:def:parameter:x-istsos::time:iso8601”, “constraint”: {

“max”: “”, “interval”: [

“2007-11-03T14:00:00+01:00”, “2011-12-07T18:00:00+01:00”

], “role”: “”, “valuelist”: “”, “min”: “”

}, “name”: “Time”, “uom”: “”, “description”: “”

}, {

“definition”: “urn:ogc:def:parameter:x-istsos::meteo:air:temperature”, “constraint”: {

“max”: “”, “interval”: “”, “role”: “”, “valuelist”: “”, “min”: “”

}, “name”: “meteo-air-temperature”, “uom”: “deg”, “description”: “”

}

], “system_id”: “DEMO_1”, “history”: []

}, “success”: true

}

executePost(db=True)

Method for executing a POST requests that create a new SOS procedure

@note: This method creates:
  1. Create a new procedure sending an XML to the istsos service

The POST must be in Json format:

>>> {
        "system_id": "P_TRE",
        "system": "P_TRE",
        "description": "ciao",
        "keywords": "uno,due,tre",
        "identification": [
            {
                "definition":"urn:ogc:def:identifier:OGC:P_TRE",
                "name":"uniqueID",
                "value":"urn:ogc:def:procedure:x-istsos:1.0:test"
            }
        ],
        "classification": [
            {
                "name": "System Type",
                "definition": "urn:ogc:def:classifier:x-istsos:1.0:systemType",
                "value": "insitu-fixed-point"
            },
            {
                "name": "Sensor Type",
                "definition": "urn:ogc:def:classifier:x-istsos:1.0:sensorType",
                "value": "bukket"
            }
        ],
        "characteristics": "",
        "contacts": [],
        "documentation": [],
        "location": {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": ["123","456"]
            },
            "crs": {
                "type": "name",
                "properties": {"name": "EPSG:21781"}
            },
            "properties": {"name": "LUGANO"}
        },
        "interfaces": "",
        "inputs": [],
        "history": [],
        "capabilities": [
            {
                "name": "Memory Capacity",
                "description": "",
                "definition": "urn:ogc:def:classifier:x-istsos:1.0:memoryCapacity",
                "uom": "Byte",
                "value": "131"
            },
            {
                "name": "Sampling time resolution",
                "definition": "urn:ogc:def:classifier:x-istsos:1.0:samplingTimeResolution",
                "uom": "iso8601",
                "value": "PT10M"
            },
            {
                "name": "Acquisition time resolution",
                "definition": "urn:ogc:def:classifier:x-istsos:1.0:acquisitionTimeResolution",
                "uom": "iso8601",
                "value": "PT1H"
            }
        ],
        "outputs": [
            {
                "name": "Time",
                "definition": "urn:ogc:def:dataType:x-istsos:1.0:time",
                "uom": "iso8601",
                "description": "",
                "constraint": {
                    "role": "urn:ogc:def:classifiers:x-istsos:1.0:dataAvailability",
                    "min": "",
                    "max": "",
                    "interval": [123,456],
                    "valuelist": ""
                }
            },
            {
                "name": "Conductivity",
                "definition": "urn:ogc:def:phenomenon:x-istsos:1.0:conductivity",
                "uom": "Pressure",
                "description": "foo bar",
                "constraint": {
                    "role": "urn:ogc:def:classifiers:x-istsos:1.0:qualityIndex:check:reasonable",
                    "interval": ["12","65"]
                }
            }
        ]
    }
executePut()

Method for executing a PUT requests that update a SOS sensorML procedure

@note: This method replace old sensorML with the new one, note that
database objectes are not updated. To update entirely a procedure consider to delete and recreate it.
  1. ...

The Put must be in Json format:

>>> {
        ...
    }

Module contents