Skip to content

Instantly share code, notes, and snippets.

@liangsteve
Last active June 6, 2017 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liangsteve/d26a96c02108210a89991470ec1d1fb0 to your computer and use it in GitHub Desktop.
Save liangsteve/d26a96c02108210a89991470ec1d1fb0 to your computer and use it in GitHub Desktop.
{"description":"Barrier Lake, a man made reservoir at the north end of Kananaskis Country in Alberta, Canada.","name":"Barrier Lake","encodingType":"application/vnd.geo+json","feature":{"type":"Polygon","coordinates":[[[-115.0808349,51.0200869],[-115.0811732,51.0193695],[-115.0813113,51.0187028],[-115.0814037,51.0185313],[-115.0815774,51.0179335],[-115.0819834,51.0172592],[-115.081975,51.0171847],[-115.0820162,51.0171477],[-115.0821478,51.0166728],[-115.0821372,51.0163606],[-115.0819536,51.0160936],[-115.0814054,51.0155017],[-115.0808016,51.0150355],[-115.0804582,51.0148681],[-115.0803947,51.0148621],[-115.0801872,51.0147238],[-115.0801117,51.0145489],[-115.0801501,51.0143314],[-115.0795956,51.0139312],[-115.0795198,51.0137849],[-115.0794817,51.013507],[-115.0793616,51.013246],[-115.0790104,51.0129468],[-115.0789775,51.0125916],[-115.0790747,51.0124001],[-115.0794104,51.0114736],[-115.0794129,51.0112159],[-115.0793558,51.0110181],[-115.0790915,51.0106534],[-115.0790929,51.0105103],[-115.0791708,51.0104275],[-115.0791764,51.0103216],[-115.0790778,51.0101895],[-115.0790263,51.0098858],[-115.0790956,51.0097572],[-115.0792562,51.0095717],[-115.0795625,51.0093466],[-115.0798994,51.0092391],[-115.0806763,51.0091648],[-115.0808587,51.0090796],[-115.0808709,51.0087532],[-115.0810825,51.0084619],[-115.0811688,51.0084536],[-115.0811289,51.0083475],[-115.081473,51.0079623],[-115.0817693,51.0078345],[-115.0820878,51.0077498],[-115.0822749,51.0076446],[-115.082381,51.0074703],[-115.0826365,51.0073224],[-115.0830731,51.0072324],[-115.0833148,51.0071159],[-115.0834851,51.0068617],[-115.0838601,51.0065654],[-115.0838709,51.0063821],[-115.0837414,51.0061612],[-115.0834264,51.0058736],[-115.0828673,51.0054935],[-115.0824858,51.0050482],[-115.0824284,51.0048791],[-115.082423,51.0044896],[-115.0826448,51.0040724],[-115.0828967,51.0033632],[-115.0830675,51.0016229],[-115.0828245,51.0014158],[-115.0826752,51.0013609],[-115.0824124,51.0013198],[-115.0818888,51.0015039],[-115.0816165,51.0015029],[-115.0813097,51.0013184],[-115.0810969,51.0007908],[-115.0809173,51.0005896],[-115.0807862,51.0005405],[-115.0805821,51.0005254],[-115.0805317,51.0005738],[-115.0801125,51.0007555],[-115.0799396,51.0008007],[-115.0798302,51.0008518],[-115.0796303,51.0008739],[-115.0795619,51.0009166],[-115.079117,51.0009321],[-115.0788364,51.0008566],[-115.0784886,51.0006806],[-115.0784441,51.0005945],[-115.078451,51.0003454],[-115.0787213,51.0000801],[-115.0780451,51.0000861],[-115.0777492,51.0001852],[-115.0776167,51.0002792],[-115.0772292,51.0004638],[-115.0771156,51.0004777],[-115.0765179,51.0008104],[-115.0762367,51.0012589],[-115.0761365,51.0012986],[-115.0759054,51.0012605],[-115.0755268,51.0009956],[-115.0753873,51.0008719],[-115.0753102,51.0008688],[-115.0754642,51.0013704],[-115.0760847,51.001957],[-115.0760886,51.0020229],[-115.0763907,51.0022273],[-115.0764893,51.0023594],[-115.0763167,51.0033094],[-115.0762243,51.0034809],[-115.0761856,51.003727],[-115.0761352,51.0037755],[-115.0758779,51.0045619],[-115.0755266,51.0052249],[-115.0751869,51.0060855],[-115.0751265,51.0062313],[-115.0751396,51.0062857],[-115.0750293,51.0064227],[-115.0749299,51.0068433],[-115.074833,51.0079396],[-115.0748745,51.0083407],[-115.0749293,51.0087676],[-115.0748742,51.0093028],[-115.0745776,51.0099259],[-115.0744078,51.0101228],[-115.0741377,51.0103595],[-115.074082,51.0104852],[-115.074085,51.010637],[-115.0742413,51.0109096],[-115.0746005,51.0113119],[-115.0745832,51.011687],[-115.0742379,51.0121868],[-115.074009,51.0123863],[-115.073894,51.0125434],[-115.0737879,51.0127176],[-115.0733183,51.0129191],[-115.0731398,51.0130702],[-115.073056,51.0132875],[-115.0730657,51.0136856],[-115.0735575,51.0144606],[-115.0745163,51.0152919],[-115.0751574,51.0156552],[-115.0755417,51.0158142],[-115.075999,51.0159391],[-115.0764159,51.0160152],[-115.0769,51.0161917],[-115.0770306,51.0162982],[-115.0772323,51.016571],[-115.0778865,51.0169887],[-115.0780756,51.0171498],[-115.0783656,51.0176807],[-115.078438,51.0181706],[-115.078352,51.0190838],[-115.0781761,51.0199107],[-115.0781517,51.0210302],[-115.0784325,51.0220393],[-115.0783855,51.0231445],[-115.0781783,51.0234444],[-115.077836,51.0236292],[-115.077536,51.0236624],[-115.0771218,51.0237668],[-115.076519,51.0241195],[-115.0763549,51.0241819],[-115.076146,51.0241868],[-115.0757831,51.0241568],[-115.0754209,51.0240408],[-115.0745527,51.0241434],[-115.0736084,51.0241283],[-115.0727395,51.0242882],[-115.0725164,51.0243532],[-115.0723975,51.0244443],[-115.0720874,51.0245748],[-115.0718598,51.0246312],[-115.0709562,51.0246363],[-115.0704027,51.0245883],[-115.0696623,51.0246169],[-115.0692896,51.0246555],[-115.0688038,51.0246508],[-115.0683063,51.0244484],[-115.0673038,51.0243499],[-115.0670684,51.0242745],[-115.0666437,51.0240667],[-115.0659964,51.0238665],[-115.0658382,51.0237943],[-115.0656758,51.0236848],[-115.0654967,51.0234264],[-115.0652931,51.023354],[-115.0650569,51.0233645],[-115.0646973,51.0234576],[-115.0645282,51.0235686],[-115.0643033,51.0238054],[-115.0639984,51.0243254],[-115.0637157,51.0244502],[-115.063088,51.0245508],[-115.0628468,51.02461],[-115.0623836,51.0246196],[-115.0619351,51.0245118],[-115.0617179,51.0244423],[-115.0609845,51.0242217],[-115.0606853,51.0241689],[-115.0605753,51.0242773],[-115.0606329,51.0244179],[-115.0608707,51.0247023],[-115.0610422,51.0248004],[-115.0612037,51.0249957],[-115.061153,51.0250729],[-115.0608173,51.0250371],[-115.0603781,51.024918],[-115.0597391,51.0247923],[-115.0591497,51.024704],[-115.057987,51.0247337],[-115.0575413,51.0248063],[-115.0573733,51.0248028],[-115.0561174,51.0250611],[-115.0550568,51.0253174],[-115.0542734,51.0255548],[-115.053527,51.0257178],[-115.0532582,51.0258112],[-115.0527649,51.0260841],[-115.0521447,51.026345],[-115.0513066,51.0265936],[-115.0507801,51.0265685],[-115.0502619,51.026618],[-115.0498565,51.0267394],[-115.0490582,51.0270941],[-115.0488487,51.0271562],[-115.0485175,51.0271291],[-115.0482593,51.0270679],[-115.0478773,51.0271178],[-115.047444,51.0273022],[-115.0467744,51.027497],[-115.04635,51.0276986],[-115.0456579,51.027879],[-115.0455534,51.0278814],[-115.0454029,51.0279409],[-115.0442938,51.0280451],[-115.0432767,51.0280351],[-115.0428087,51.0280647],[-115.0425071,51.0282409],[-115.0422765,51.0285836],[-115.0419523,51.0287455],[-115.0417345,51.0287331],[-115.0413344,51.0287773],[-115.0405211,51.0292492],[-115.039885,51.0292752],[-115.0397301,51.0293261],[-115.0395561,51.0294571],[-115.0394235,51.0303987],[-115.0392848,51.0306272],[-115.0389791,51.0307662],[-115.0387339,51.0307594],[-115.0383804,51.0306892],[-115.0383128,51.030646],[-115.0382039,51.0306398],[-115.0380231,51.0305531],[-115.0378507,51.0305409],[-115.0373892,51.0303786],[-115.0369433,51.0301436],[-115.0366048,51.0301018],[-115.0361885,51.0303039],[-115.0357143,51.0306102],[-115.0357706,51.0308238],[-115.0357379,51.0310205],[-115.0363602,51.0310472],[-115.037161,51.0313398],[-115.0378317,51.0314687],[-115.0393509,51.0320994],[-115.0409833,51.0327735],[-115.0415229,51.0328531],[-115.0415406,51.0328525],[-115.0417515,51.0328453],[-115.0432107,51.0325824],[-115.0443031,51.0323579],[-115.0453936,51.0323051],[-115.0465823,51.0324132],[-115.0471439,51.0325644],[-115.047699,51.0329075],[-115.0480442,51.0333414],[-115.0486817,51.0336103],[-115.0490305,51.0337005],[-115.0494876,51.0338542],[-115.0503211,51.0340638],[-115.050412,51.0340642],[-115.0504981,51.0340846],[-115.0510469,51.0341527],[-115.0519327,51.034142],[-115.0527596,51.0341053],[-115.0542103,51.0339308],[-115.0547609,51.0338271],[-115.0552159,51.033743],[-115.0569805,51.0335039],[-115.0580393,51.0334481],[-115.0584169,51.0333895],[-115.0586445,51.0333331],[-115.0593749,51.0329638],[-115.0597405,51.0327361],[-115.0605116,51.032387],[-115.0612082,51.0322151],[-115.0622832,51.0318987],[-115.0630726,51.0315267],[-115.0640063,51.0312583],[-115.064125,51.0311958],[-115.0653462,51.0307826],[-115.0656109,51.0306519],[-115.0661302,51.0304878],[-115.0664573,51.0304777],[-115.0665977,51.0305155],[-115.0666741,51.0306045],[-115.0666821,51.0307077],[-115.0665427,51.0310221],[-115.0666152,51.0310453],[-115.066901,51.0310722],[-115.067329,51.0309651],[-115.068179,51.0308854],[-115.0685657,51.0308153],[-115.06868,51.0307442],[-115.0685992,51.0306465],[-115.0681598,51.0305273],[-115.0684616,51.0303223],[-115.0695284,51.0299027],[-115.0696699,51.0298259],[-115.0704077,51.0296169],[-115.0713926,51.0292141],[-115.071748,51.0290838],[-115.0719846,51.0290446],[-115.0725721,51.0288665],[-115.073511,51.0285208],[-115.0735659,51.0284809],[-115.0736659,51.0284698],[-115.0741988,51.0283029],[-115.0744398,51.0282724],[-115.0744991,51.0282411],[-115.0746855,51.0282218],[-115.0748178,51.0281564],[-115.0749769,51.0281427],[-115.0754597,51.0279957],[-115.0767183,51.0274507],[-115.0771011,51.0273147],[-115.0779005,51.0268167],[-115.0783635,51.0263689],[-115.0785406,51.0258942],[-115.0786699,51.025677],[-115.0786568,51.0256226],[-115.0789252,51.025091],[-115.0789169,51.0250165],[-115.0790002,51.0248564],[-115.0790753,51.0245933],[-115.0793296,51.0241217],[-115.0795488,51.0239908],[-115.0797486,51.0239973],[-115.0800795,51.024053],[-115.0805878,51.0240721],[-115.08066,51.024124],[-115.0807241,51.0240727],[-115.0810834,51.0240082],[-115.081485,51.0237921],[-115.081536,51.0236863],[-115.0808955,51.0232371],[-115.0805883,51.0230813],[-115.0799674,51.0229615],[-115.0798362,51.0229124],[-115.0797799,51.0226286],[-115.0800528,51.0221056],[-115.0801168,51.0220543],[-115.0803561,51.0217288],[-115.0807871,51.0208112],[-115.0810297,51.0206088],[-115.0810536,51.0204801],[-115.0808291,51.0202215],[-115.0808349,51.0200869]]]}}
{
"description": "Barrier Lake Water Level Station",
"name":"Barrier Lake",
"Locations": [
{
"encodingType": "application/vnd.geo+json",
"description": "Station location",
"location": {"coordinates":[-115.0413, 51.0330],"type":"Point"},
"name":"Barrier Lake"
}
]
}
#!/bin/bash
while read f1 f2 f3
do
t="$f1"T"$f2":00-0800\
v=$f3
s="{\"result\":\""$v"\",\"phenomenonTime\":\""$t"\",\"Datastream\":{\"@iot.id\":17182},\"FeatureOfInterest\":{\"@iot.id\":17183}}"
curl --request POST \
--data "${s}" \
--header "Content-Type: application/json" \
http://webinar-transient.sensorup.com:8080/OGCSensorThings/v1.0/Observations
done < fileName
{
"description": "Daily Water Level of a water body",
"name":"Daily Water Level",
"unitOfMeasurement": {
"name": "meter",
"symbol": "m",
"definition": "https://en.wikipedia.org/wiki/Metre"
},
"observationType": "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Observation",
"ObservedProperty": {
"name": "Water Level",
"definition": "http://www.tides.gc.ca/eng/info/glossary",
"description": "the height reached by the water in a reservoir, river, storage tank, etc."
},
"Sensor": {
"encodingType": "http://schema.org/description",
"metadata": "Water level sensor station",
"description": "Water level station",
"name":"water level sensor"
},
"Thing": {
"@iot.id": "id_here"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment