Skip to content
Rahul Chauhan edited this page Jul 12, 2018 · 10 revisions

Welcome to the Support-of-Unit-Of-Measure-conversion-in-istSOS3 wiki!

Using PostgreSQL-unit:-

  1. Clone this Repo. git clone https://github.com/ChristophBerg/postgresql-unit.git

  2. cd postgresql-unit

  3. Change postgresql-server-dev-(10, 9.5 etc.) according to your installation configuration sudo apt-get install build-essential postgresql-server-dev-10 flex bison make PG_CONFIG=/usr/lib/postgresql/10/bin/pg_config sudo make install PG_CONFIG=/usr/lib/postgresql/10/bin/pg_config

  4. For more detail postgresql-unit https://github.com/ChristophBerg/postgresql-unit.

  5. Clone istsos3 testing repo. git clone https://github.com/rahulworld/Support-of-Unit-Of-Measure-conversion-in-istSOS3

  6. Install istsos3 Using main repo. documentation https://github.com/rahulworld/istsos3/blob/master/README.md .

  7. cd istsos3

  8. Start server using python examples/server_tornado.py

  9. Install Postman for Post request easily https://www.getpostman.com/.

  10. listen at http://localhost:8887/rest in Postman.

  11. Insert sensor with one observable property sensor in istsos3 using http://istsos.org/en/v3.0.0-Beta/index.html OR Insert Sensor { "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": "beline_foi", "name": "beline_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": "2015-05-03T16:30:00.000000+0200" } }, "resultTime": { "timeInstant": { "instant": "2015-06-03T16:30:00.000000+0200" } }, "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" } }] }

  12. Fetch Observation of any offering from istsos3 and change in_unit variable 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" }

Clone this wiki locally