2020-11-17 16:29:51 +01:00
{
2021-04-20 10:49:45 +02:00
"id" : "surveillance_camera" ,
2020-11-17 16:29:51 +01:00
"name" : {
"en" : "Surveillance camera's" ,
"nl" : "Bewakingscamera's"
} ,
"minzoom" : 12 ,
2021-03-20 23:45:52 +01:00
"source" : {
"osmTags" : {
"and" : [
"man_made=surveillance" ,
{
"or" : [
"surveillance:type=camera" ,
"surveillance:type=ALPR" ,
"surveillance:type=ANPR"
]
}
]
}
2020-11-17 16:29:51 +01:00
} ,
"title" : {
"render" : {
"en" : "Surveillance Camera" ,
"nl" : "Bewakingscamera"
}
} ,
"tagRenderings" : [
"images" ,
{
"#" : "Camera type: fixed; panning; dome" ,
"question" : {
"en" : "What kind of camera is this?" ,
"nl" : "Wat voor soort camera is dit?"
} ,
"mappings" : [
{
"if" : {
"and" : [
"camera:type=fixed"
]
} ,
"then" : {
"en" : "A fixed (non-moving) camera" ,
"nl" : "Een vaste camera"
}
} ,
{
"if" : {
"and" : [
"camera:type=dome"
]
} ,
"then" : {
"en" : "A dome camera (which can turn)" ,
"nl" : "Een dome (bolvormige camera die kan draaien)"
}
} ,
{
"if" : {
"and" : [
"camera:type=panning"
]
} ,
"then" : {
"en" : "A panning camera" ,
"nl" : "Een camera die (met een motor) van links naar rechts kan draaien"
}
}
]
} ,
{
"#" : "direction. We don't ask this for a dome on a pole or ceiling as it has a 360° view" ,
"question" : {
"en" : "In which geographical direction does this camera film?" ,
2021-04-28 20:42:23 +02:00
"nl" : "In welke geografische richting filmt deze camera?"
} ,
"render" : {
"en" : "Films to a compass heading of {camera:direction}" ,
"nl" : "Filmt in kompasrichting {camera:direction}"
2020-11-17 16:29:51 +01:00
} ,
"condition" : {
"or" : [
2021-04-28 20:42:23 +02:00
"camera:direction~*" ,
"direction~*" ,
2020-11-17 16:29:51 +01:00
"camera:type!=dome" ,
{
"and" : [
2020-12-27 22:24:27 +01:00
"camera:type=dome" ,
"camera:mount=wall"
2020-11-17 16:29:51 +01:00
]
}
]
} ,
"freeform" : {
"key" : "camera:direction" ,
"type" : "direction"
2021-04-28 20:42:23 +02:00
} ,
"mappings" : [
{
"if" : {
"and" : [
"camera:direction=" ,
"direction~*"
]
} ,
"then" : {
"en" : "Films to a compass heading of {direction}" ,
"nl" : "Filmt in kompasrichting {direction}"
} ,
"hideInAnswer" : true
}
]
2020-11-17 16:29:51 +01:00
} ,
{
"#" : "Operator" ,
"freeform" : {
"key" : "operator"
} ,
"question" : {
"en" : "Who operates this CCTV?" ,
"nl" : "Wie beheert deze bewakingscamera?"
} ,
"render" : {
"en" : "Operated by {operator}" ,
"nl" : "Beheer door {operator}"
}
} ,
{
"#" : "Surveillance type: public, outdoor, indoor" ,
"question" : {
"en" : "What kind of surveillance is this camera" ,
"nl" : "Wat soort bewaking wordt hier uitgevoerd?"
} ,
"mappings" : [
{
"if" : {
"and" : [
"surveillance=public"
]
} ,
"then" : {
"en" : "A public area is surveilled, such as a street, a bridge, a square, a park, a train station, a public corridor or tunnel,..." ,
"nl" : "Bewaking van de publieke ruilmte, dus een straat, een brug, een park, een plein, een stationsgebouw, een publiek toegankelijke gang of tunnel..."
}
} ,
{
"if" : {
"and" : [
"surveillance=outdoor"
]
} ,
"then" : {
"en" : "An outdoor, yet private area is surveilled (e.g. a parking lot, a fuel station, courtyard, entrance, private driveway, ...)" ,
"nl" : "Een buitenruimte met privaat karakter (zoals een privé-oprit, een parking, tankstation, ...)"
}
} ,
{
"if" : {
"and" : [
"surveillance=indoor"
]
} ,
"then" : {
"nl" : "Een private binnenruimte wordt bewaakt, bv. een winkel, een parkeergarage, ..." ,
"en" : "A private indoor area is surveilled, e.g. a shop, a private underground parking, ..."
}
}
]
} ,
{
"#" : "Indoor camera? This isn't clear for 'public'-cameras" ,
"question" : {
"en" : "Is the public space surveilled by this camera an indoor or outdoor space?" ,
"nl" : "Bevindt de bewaakte publieke ruimte camera zich binnen of buiten?"
} ,
"condition" : {
"and" : [
"surveillance:type=public"
]
} ,
"mappings" : [
{
"if" : "indoor=yes" ,
"then" : {
"en" : "This camera is located indoors" ,
"nl" : "Deze camera bevindt zich binnen"
}
} ,
{
"if" : "indoor=no" ,
"then" : {
"en" : "This camera is located outdoors" ,
"nl" : "Deze camera bevindt zich buiten"
}
} ,
{
"if" : "indoor=" ,
"then" : {
"en" : "This camera is probably located outdoors" ,
"nl" : "Deze camera bevindt zich waarschijnlijk buiten"
} ,
"hideInAnswer" : true
}
]
} ,
{
"#" : "Level" ,
"question" : {
"en" : "On which level is this camera located?" ,
"nl" : "Op welke verdieping bevindt deze camera zich?"
} ,
2021-01-12 20:46:01 +01:00
"render" : {
"en" : "Located on level {level}" ,
"nl" : "Bevindt zich op verdieping {level}"
} ,
2020-11-17 16:29:51 +01:00
"freeform" : {
"key" : "level" ,
"type" : "nat"
} ,
"condition" : {
"or" : [
"indoor=yes" ,
"surveillance:type=ye"
]
}
} ,
{
"#" : "Surveillance:zone" ,
"question" : {
"en" : "What exactly is surveilled here?" ,
"nl" : "Wat wordt hier precies bewaakt?"
} ,
"freeform" : {
"key" : "surveillance:zone"
} ,
"render" : {
"en" : " Surveills a {surveillance:zone}" ,
"nl" : "Bewaakt een {surveillance:zone}"
} ,
"mappings" : [
{
"if" : {
"and" : [
"surveillance:zone=parking"
]
} ,
"then" : {
"en" : "Surveills a parking" ,
"nl" : "Bewaakt een parking"
}
} ,
{
"if" : {
"and" : [
"surveillance:zone=traffic"
]
} ,
"then" : {
"en" : "Surveills the traffic" ,
"nl" : "Bewaakt het verkeer"
}
} ,
{
"if" : {
"and" : [
"surveillance:zone=entrance"
]
} ,
"then" : {
"en" : "Surveills an entrance" ,
"nl" : "Bewaakt een ingang"
}
} ,
{
"if" : {
"and" : [
"surveillance:zone=corridor"
]
} ,
"then" : {
"en" : "Surveills a corridor" ,
"nl" : "Bewaakt een gang"
}
} ,
{
"if" : {
"and" : [
"surveillance:zone=public_transport_platform"
]
} ,
"then" : {
"en" : "Surveills a public tranport platform" ,
"nl" : "Bewaakt een perron of bushalte"
}
} ,
{
"if" : {
"and" : [
"surveillance:zone=shop"
]
} ,
"then" : {
"en" : "Surveills a shop" ,
"nl" : "Bewaakt een winkel"
}
}
]
} ,
{
"#" : "camera:mount" ,
"question" : {
"en" : "How is this camera placed?" ,
"nl" : "Hoe is deze camera geplaatst?"
} ,
2021-01-12 20:46:01 +01:00
"render" : {
"en" : "Mounting method: {mount}" ,
2021-04-07 21:59:55 +02:00
"nl" : "Montage: {camera:mount}"
2021-01-12 20:46:01 +01:00
} ,
2020-11-17 16:29:51 +01:00
"freeform" : {
"key" : "camera:mount"
} ,
"mappings" : [
{
"if" : "camera:mount=wall" ,
"then" : {
"en" : "This camera is placed against a wall" ,
"nl" : "Deze camera hangt aan een muur"
}
} ,
{
"if" : "camera:mount=pole" ,
"then" : {
"en" : "This camera is placed one a pole" ,
"nl" : "Deze camera staat op een paal"
}
} ,
{
"if" : "camera:mount=ceiling" ,
"then" : {
"en" : "This camera is placed on the ceiling" ,
"nl" : "Deze camera hangt aan het plafond"
}
}
]
}
] ,
"hideUnderlayingFeaturesMinPercentage" : 0 ,
"icon" : {
"render" : "./assets/themes/surveillance_cameras/logo.svg" ,
"mappings" : [
{
"if" : "camera:type=dome" ,
"then" : "./assets/themes/surveillance_cameras/dome.svg"
} ,
{
"if" : "_direction:leftright=right" ,
"then" : "./assets/themes/surveillance_cameras/cam_right.svg"
} ,
{
"if" : "_direction:leftright=left" ,
"then" : "./assets/themes/surveillance_cameras/cam_left.svg"
}
]
} ,
"rotation" : {
2021-01-04 04:06:21 +01:00
"#" : "Note: {camera:direction} is substituted by a number, giving the string 'calc(123deg + 90deg)' ; it is this string that is used as css property, which interprets the calc" ,
Fix issues with camera rotation
This commit fixes at least these issues that I was aware of:
* Cardinal directions (e.g. NE) were not recognized.
* The camera icon did not rotatie when direction=* was used instead of
camera:direction, but the blue direction visualizer did.
Pietervdvn said he would have liked to convert the code for direction
normalizing to calculatedTags in a JSON file (as documented in
Docs/CalculatedTags.md), but when he saw the oneliners I had to produce
in response, I was allowed to keep it in SimpleMetaTagger.ts for now.
For your amusement, the oneliners are included below.
"calculatedTags": [
"_direction:numerical=(dir => dir === undefined ? undefined : ({N: 0, NNE: 22.5, NE: 45, ENE: 67.5, E: 90, ESE: 112.5, SE: 135, SSE: 157.5, S: 180, SSW: 202.5, SW: 225, WSW: 247.5, W: 270, WNW: 292.5, NW: 315, NNW: 337.5}[dir] ?? (isNaN(parseFloat(dir)) ? undefined : ((parseFloat(dir) % 360 + 360) % 360)))))(feat.properties['camera:direction'] ?? feat.properties.direction)",
"_direction:leftright=feat.properties['_direction:numerical'] === undefined ? undefined : (feat.properties['_direction:numerical'] <= 180 ? 'right' : 'left')"
]
2021-04-28 16:45:48 +02:00
"render" : "calc({_direction:numerical}deg + 90deg)" ,
2020-11-17 16:29:51 +01:00
"mappings" : [
{
"if" : "camera:type=dome" ,
"then" : "0"
} ,
{
"if" : "_direction:leftright=right" ,
Fix issues with camera rotation
This commit fixes at least these issues that I was aware of:
* Cardinal directions (e.g. NE) were not recognized.
* The camera icon did not rotatie when direction=* was used instead of
camera:direction, but the blue direction visualizer did.
Pietervdvn said he would have liked to convert the code for direction
normalizing to calculatedTags in a JSON file (as documented in
Docs/CalculatedTags.md), but when he saw the oneliners I had to produce
in response, I was allowed to keep it in SimpleMetaTagger.ts for now.
For your amusement, the oneliners are included below.
"calculatedTags": [
"_direction:numerical=(dir => dir === undefined ? undefined : ({N: 0, NNE: 22.5, NE: 45, ENE: 67.5, E: 90, ESE: 112.5, SE: 135, SSE: 157.5, S: 180, SSW: 202.5, SW: 225, WSW: 247.5, W: 270, WNW: 292.5, NW: 315, NNW: 337.5}[dir] ?? (isNaN(parseFloat(dir)) ? undefined : ((parseFloat(dir) % 360 + 360) % 360)))))(feat.properties['camera:direction'] ?? feat.properties.direction)",
"_direction:leftright=feat.properties['_direction:numerical'] === undefined ? undefined : (feat.properties['_direction:numerical'] <= 180 ? 'right' : 'left')"
]
2021-04-28 16:45:48 +02:00
"then" : "calc({_direction:numerical}deg - 90deg)"
2020-11-17 16:29:51 +01:00
}
]
} ,
"width" : {
"render" : "8"
} ,
"iconSize" : {
"mappings" : [
{
"if" : "camera:type=dome" ,
"then" : "50,50,center"
} ,
{
"if" : "_direction:leftright~*" ,
"then" : "100,35,center"
}
] ,
"render" : "50,50,center"
} ,
"color" : {
"render" : "#f00"
} ,
"presets" : [
{
"tags" : [
"man_made=surveillance" ,
"surveillance:type=camera"
] ,
"title" : "Surveillance camera"
}
] ,
"wayHandling" : 2
Fix issues with camera rotation
This commit fixes at least these issues that I was aware of:
* Cardinal directions (e.g. NE) were not recognized.
* The camera icon did not rotatie when direction=* was used instead of
camera:direction, but the blue direction visualizer did.
Pietervdvn said he would have liked to convert the code for direction
normalizing to calculatedTags in a JSON file (as documented in
Docs/CalculatedTags.md), but when he saw the oneliners I had to produce
in response, I was allowed to keep it in SimpleMetaTagger.ts for now.
For your amusement, the oneliners are included below.
"calculatedTags": [
"_direction:numerical=(dir => dir === undefined ? undefined : ({N: 0, NNE: 22.5, NE: 45, ENE: 67.5, E: 90, ESE: 112.5, SE: 135, SSE: 157.5, S: 180, SSW: 202.5, SW: 225, WSW: 247.5, W: 270, WNW: 292.5, NW: 315, NNW: 337.5}[dir] ?? (isNaN(parseFloat(dir)) ? undefined : ((parseFloat(dir) % 360 + 360) % 360)))))(feat.properties['camera:direction'] ?? feat.properties.direction)",
"_direction:leftright=feat.properties['_direction:numerical'] === undefined ? undefined : (feat.properties['_direction:numerical'] <= 180 ? 'right' : 'left')"
]
2021-04-28 16:45:48 +02:00
}