Commit 92eb52dc by Adi Amir

Merge remote-tracking branch 'origin/master'

parents ee7971cb 684b8b52
common/docs/\.~lock\.Accounts\.odt# common/docs/\.~lock\.Accounts\.odt#
.idea
No preview for this file type
# Installation with Docker:
https://www.elastic.co/guide/en/elasticsearch/reference/5.5/docker.html
https://www.elastic.co/guide/en/kibana/5.5/_configuring_kibana_on_docker.html
#create index with mapping #create index with mapping
curl -XPUT "http://localhost:9200/activityidx" -d'{ "mappings": { "activity": { "properties": { "metaData.loc": { "type": "geo_point" } } } } }' curl -XPUT "http://localhost:9200/activityidx" -d'{ "mappings": { "activity": { "properties": { "metaData.loc": { "type": "geo_point" } } } } }'
- https://www.elastic.co/blog/changing-mapping-with-zero-downtime - https://www.elastic.co/blog/changing-mapping-with-zero-downtime
...@@ -172,6 +177,30 @@ POST /activityidx/activity/_search ...@@ -172,6 +177,30 @@ POST /activityidx/activity/_search
} }
} }
{ "query": { \
"bool": { \
"must": [ \
{ "query_string":{ "query":"tenant:fremont & type:\"thing/traffic-lanes\"" } } \
], \
"filter" : { \
"geo_bounding_box" : { \
"metaData.loc" : { \
"top_left" : { \
"lat" : 37.629134, \
"lon" : -122.173405 \
}, \
"bottom_right" : { \
"lat" : 37.457418, \
"lon" : -121.835116 \
} \
} \
}\
}\
}\
}\
}
///CSV ///CSV
pip install es2csv pip install es2csv
...@@ -181,6 +210,8 @@ es2csv -q 'type:"thing/traffic-lane" AND userId:"chicago/*"' -u 172.16.1.72:9200 ...@@ -181,6 +210,8 @@ es2csv -q 'type:"thing/traffic-lane" AND userId:"chicago/*"' -u 172.16.1.72:9200
es2csv -q 'type:"thing/traffic-lane" AND userId:"chicago/*" AND creationTime:>1519895494000' -u 172.16.1.72:9200 -o activities-traffic-chicago.csv -m 100000 -i activityidx -f creationTime id type metaData.loc metaData.measures.speed metaData.measures.vehicleCount es2csv -q 'type:"thing/traffic-lane" AND userId:"chicago/*" AND creationTime:>1519895494000' -u 172.16.1.72:9200 -o activities-traffic-chicago.csv -m 100000 -i activityidx -f creationTime id type metaData.loc metaData.measures.speed metaData.measures.vehicleCount
es2csv -r -q '{ "query":{"bool":{"must":[{"query_string":{"query":"tenant:fremont & type:\"thing/traffic-lanes\"" }}],"filter":{"geo_bounding_box":{"metaData.loc":{"top_left":{"lat" : 37.629134,"lon" : -122.173405 }, "bottom_right" : { "lat" : 37.457418, "lon" : -121.835116 }}}}}}}' -u 172.16.1.72:9200 -o activities-traffic-fremont.csv -m 100000 -i activityidx -f creationTime id type metaData.loc metaData.toLocation metaData.measures.speed
// CURATOR // CURATOR
command line app for managing elasticsearch indices. command line app for managing elasticsearch indices.
...@@ -191,3 +222,4 @@ https://www.elastic.co/guide/en/elasticsearch/client/curator/4.2/index.html ...@@ -191,3 +222,4 @@ https://www.elastic.co/guide/en/elasticsearch/client/curator/4.2/index.html
curator_cli --host 172.16.1.72 --port 9200 show_indices curator_cli --host 172.16.1.72 --port 9200 show_indices
[ [
{ {
"id": "fremont/camera/ct-cam-pop-S880_at_JCT_84", "id": "fremont/camera/S880_at_JCT_84",
"lat": 37.56425000, "lat": 37.56425000,
"lon": -122.03972222, "lon": -122.03972222,
"mediaType": "FLASH", "mediaType": "FLASH",
"name": "ct-cam-pop-S880_at_JCT_84", "name": "S880_at_JCT_84",
"views": [ "views": [
{ {
"id": "fremont/camera/ct-cam-pop-S880_at_JCT_84", "id": "fremont/camera/S880_at_JCT_84",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream", "liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false" "flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
} }
] ]
},
{
"id": "fremont/camera/W80_at_Fremont_St_Ofr",
"lat": 37.78537,
"lon": -122.39244,
"mediaType": "FLASH",
"name": "W80_at_Fremont_St_Ofr",
"views": [
{
"id": "fremont/camera/W80_at_Fremont_St_Ofr",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/W80_at_Fremont_St_Ofr.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S680_at_N_Main_St",
"lat": 37.91497,
"lon": -122.06656,
"mediaType": "FLASH",
"name": "S680_at_N_Main_St",
"views": [
{
"id": "fremont/camera/S680_at_N_Main_St",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S680_at_N_Main_St.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S680_JSO_JCT_80",
"lat": 38.20523,
"lon": -122.13828,
"mediaType": "FLASH",
"name": "S680_JSO_JCT_80",
"views": [
{
"id": "fremont/camera/S680_at_N_Main_St.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S680_JSO_JCT_80.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/N680_JNO_Greenbrook",
"lat": 37.79359,
"lon": -121.98325,
"mediaType": "FLASH",
"name": "N680_JNO_Greenbrook",
"views": [
{
"id": "fremont/camera/N680_JNO_Greenbrook.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/N680_JNO_Greenbrook.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/N880_at_JCT_101",
"lat": 37.36369,
"lon": -121.90245,
"mediaType": "FLASH",
"name": "N880_at_JCT_101",
"views": [
{
"id": "fremont/camera/N880_at_JCT_101.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/N880_at_JCT_101.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S880_JNO_JCT_238",
"lat": 37.69428,
"lon": -122.1437,
"mediaType": "FLASH",
"name": "S880_JNO_JCT_238",
"views": [
{
"id": "fremont/camera/S880_JNO_JCT_238.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_JNO_JCT_238.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S880_at_Paseo_Grande_OC",
"lat": 37.68112,
"lon": -122.12463,
"mediaType": "FLASH",
"name": "S880_at_Paseo_Grande_OC",
"views": [
{
"id": "fremont/camera/S880_at_Paseo_Grande_OC.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_at_Paseo_Grande_OC.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/E80_at_580_880",
"lat": 37.82854,
"lon": -122.29346,
"mediaType": "FLASH",
"name": "E80_at_580_880",
"views": [
{
"id": "fremont/camera/E80_at_580_880.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/E80_at_580_880.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S880_JNO_The_Alameda",
"lat": 37.34504,
"lon": -121.92384,
"mediaType": "FLASH",
"name": "S880_JNO_The_Alameda",
"views": [
{
"id": "fremont/camera/S880_JNO_The_Alameda.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_JNO_The_Alameda.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S880_at_66th_Av",
"lat": 37.75385,
"lon": -122.20864,
"mediaType": "FLASH",
"name": "S880_at_66th_Av",
"views": [
{
"id": "fremont/camera/S880_at_66th_Av.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_at_66th_Av.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
} }
] ]
version: "2"
services:
traffic-tiles-fremont:
image: municipalitybank.com:5050/mcx/transportation/traffic-tiles:38f8b20a2
environment:
- file=cities/fremont-geojson.json
- tenant=fremont
- activitiesHostPort=172.16.1.72:50070
- entitiesHostPort=172.16.1.72:8012
- tsdbHostPort=172.16.1.72:8086
networks:
- backend
networks:
backend:
driver: bridge
Converting from RTSP/RTMP to HLS:
- Nimble Server & WMSPanel: https://wmspanel.com/server
nimble server connects ro remote soutce and setup input channel convert it to HLS/DASH
and creates output channel for HLS/DASH, works with Rest Api's, no HTTP Interface
The WMSPanel provides HTTP interface to control multiple nimble server
Nimble Server is free but WMSPanel costs and is on their cloud.
Implementing Semantics with OrientDB:
- OrientDB support Thinker Pop which has Sail objects
- https://github.com/tinkerpop/rexster/tree/master/rexster-kibbles/sparql-kibble
implementing SPARQL via rexter on Sail objects
- oneM2M uses SPARQL for semantic queries
IOT-ONEM2M Client:
https://os-iot.org/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment