-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the Support-of-Unit-Of-Measure-conversion-in-istSOS3 wiki!
Using PostgreSQL-unit:-
-
Clone this Repo.
git clone https://github.com/ChristophBerg/postgresql-unit.git -
cd postgresql-unit -
Change postgresql-server-dev-(10, 9.5 etc.) according to your installation configuration
sudo apt-get install build-essential postgresql-server-dev-10 flex bisonmake PG_CONFIG=/usr/lib/postgresql/10/bin/pg_configsudo make install PG_CONFIG=/usr/lib/postgresql/10/bin/pg_config -
For more detail postgresql-unit https://github.com/ChristophBerg/postgresql-unit.
-
Clone istsos3 testing repo.
git clone https://github.com/rahulworld/Support-of-Unit-Of-Measure-conversion-in-istSOS3 -
Install istsos3 Using main repo. documentation https://github.com/rahulworld/istsos3/blob/master/README.md .
-
cd istsos3 -
Start server using
python examples/server_tornado.py -
Install Postman for Post request easily https://www.getpostman.com/.
-
listen at
http://localhost:8887/restin Postman. -
Insert sensor with one observable property sensor in istsos3 using http://istsos.org/en/v3.0.0-Beta/index.html OR
"action": "CREATE_SENSOR",
"data": {
"name": "belin",
"fixed": true,
"procedure": "belin",
"procedure_description_format": ["http://www.opengis.net/sensorML/1.0.1"],
"observable_properties": [
{
"name": "temperature",
"definition": "urn:ogc:def:parameter:x-istsos:1.0:temperature",
"uom": "°C",
"type": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement"
}
],
"observation_types": [
"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement"
],
"foi_type": "http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint",
"sampled_foi": {
"identifier": "belin_foi",
"name": "belin_foi",
"type": "http://www.opengis.net/def/samplingFeatureType/OGC-OM/2.0/SF_SamplingPoint",
"shape": {
"type": "Point",
"coordinates": [
0.0,
0.0,
0.0
]
}
}
}
}
Insert Observation any valid data like bellinzona with one observable property
"action": "INSERT_OBSERVATIONS",
"data": [{
"offering": "belin",
"procedure": "belin",
"type": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement",
"featureOfInterest": {
"href": "beline_foi"
},
"phenomenonTime": {
"timeInstant": {
"instant": "2003-08-05T00:00:00+02:00"
}
},
"resultTime": {
"timeInstant": {
"instant": "2003-08-05T00:00:00+02:00"
}
},
"result": 28.3,
"observedProperty": {
"name": "temperature",
"def": "urn:ogc:def:parameter:x-istsos:1.0:temperature",
"uom": "°C",
"type": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement"
}
}]
}
- Fetch Observation of any offering from istsos3 and change
in_unitvariable according to specific unit below script
"action": "UNIT_CONVERSION_USING_POSTGRESQL_UNIT",
"data": {
"offerings": ["belin","belin"],
"observedProperties": [
"urn:ogc:def:parameter:x-istsos:1.0:temperature"
],
"temporal": {
"reference": "om:phenomenonTime",
"fes": "during",
"period": [
"2015-05-03T16:30:00.000000+0200",
"2015-06-03T16:30:00.000000+0200"
]
},
"responseFormat": "application/json;subtype='array'"
},
"in_unit":"°F"
}