From ad1b6998a44fe98b5339902d358def7151fc3a7c Mon Sep 17 00:00:00 2001 From: bkil Date: Tue, 8 Nov 2016 11:59:10 +0100 Subject: [PATCH 1/3] data/presets/fields: add surveillance and camera related properties https://wiki.openstreetmap.org/wiki/Tag:man_made%3Dsurveillance https://wiki.openstreetmap.org/wiki/Proposed_features/Extended_tags_for_Key:Surveillance These are mandatory tags: * `surveillance` * `surveillance:type` I do not feel that the following are important, they can be selected from the drop down manually anyway: * `operator` * `name` These tags are well established: * `camera:type` has 15k users * `camera:mount` has 13k users * `surveillance:zone` has 17k users (mostly traffic is noted) * `camera:direction` has 6k users These tags are in the proposed status: * `contact:webcam` usage is only starting * `height` People used various tags instead of `contact:webcam` in the past because of it being a recent tag, and/or a lack of knowledge or being mislead by the dropdown. Thus it is difficult to quote an exact number, but by using complex regexp queries, I could find thousands of usages for webcam links when properly combining man_made/surveillance/camera and various (sometimes invalid) keywords in the key or value part of a tag: * `website` * `image` * `uri`, `url`, `link`, `http`, `contact` * `stream` * `webcam` --- data/presets/fields/camera/direction.json | 6 ++++++ data/presets/fields/camera/mount.json | 6 ++++++ data/presets/fields/camera/type.json | 6 ++++++ data/presets/fields/contact/webcam.json | 7 +++++++ data/presets/fields/surveillance.json | 6 ++++++ data/presets/fields/surveillance/type.json | 6 ++++++ data/presets/fields/surveillance/zone.json | 6 ++++++ 7 files changed, 43 insertions(+) create mode 100644 data/presets/fields/camera/direction.json create mode 100644 data/presets/fields/camera/mount.json create mode 100644 data/presets/fields/camera/type.json create mode 100644 data/presets/fields/contact/webcam.json create mode 100644 data/presets/fields/surveillance.json create mode 100644 data/presets/fields/surveillance/type.json create mode 100644 data/presets/fields/surveillance/zone.json diff --git a/data/presets/fields/camera/direction.json b/data/presets/fields/camera/direction.json new file mode 100644 index 000000000..61a24ad01 --- /dev/null +++ b/data/presets/fields/camera/direction.json @@ -0,0 +1,6 @@ +{ + "key": "camera:direction", + "type": "number", + "label": "Camera direction", + "placeholder": "90 (degrees clockwise)" +} diff --git a/data/presets/fields/camera/mount.json b/data/presets/fields/camera/mount.json new file mode 100644 index 000000000..2b0bf9571 --- /dev/null +++ b/data/presets/fields/camera/mount.json @@ -0,0 +1,6 @@ +{ + "key": "camera:mount", + "type": "combo", + "label": "Camera mount", + "options": [ "pole", "wall", "ceiling", "roof", "gantry" ] +} diff --git a/data/presets/fields/camera/type.json b/data/presets/fields/camera/type.json new file mode 100644 index 000000000..fc6e16338 --- /dev/null +++ b/data/presets/fields/camera/type.json @@ -0,0 +1,6 @@ +{ + "key": "camera:type", + "type": "combo", + "label": "Camera type", + "options": ["fixed", "panning", "dome"] +} diff --git a/data/presets/fields/contact/webcam.json b/data/presets/fields/contact/webcam.json new file mode 100644 index 000000000..0a1371f9a --- /dev/null +++ b/data/presets/fields/contact/webcam.json @@ -0,0 +1,7 @@ +{ + "key": "contact:webcam", + "type": "url", + "icon": "website", + "label": "Webcam feed URL", + "placeholder": "http://example.com/" +} diff --git a/data/presets/fields/surveillance.json b/data/presets/fields/surveillance.json new file mode 100644 index 000000000..2afb60217 --- /dev/null +++ b/data/presets/fields/surveillance.json @@ -0,0 +1,6 @@ +{ + "key": "surveillance", + "type": "combo", + "label": "Surveillance kind", + "options": ["outdoor", "public", "indoor"] +} diff --git a/data/presets/fields/surveillance/type.json b/data/presets/fields/surveillance/type.json new file mode 100644 index 000000000..4ba3cf39f --- /dev/null +++ b/data/presets/fields/surveillance/type.json @@ -0,0 +1,6 @@ +{ + "key": "surveillance:type", + "type": "combo", + "label": "What is watching", + "options": ["camera", "guard", "alpr"] +} diff --git a/data/presets/fields/surveillance/zone.json b/data/presets/fields/surveillance/zone.json new file mode 100644 index 000000000..99aaca4db --- /dev/null +++ b/data/presets/fields/surveillance/zone.json @@ -0,0 +1,6 @@ +{ + "key": "surveillance:zone", + "type": "combo", + "label": "Zone", + "options": ["traffic", "building", "town", "parking", "shop", "bank"] +} From c87ff327e1b0a7e701bee6b3e0412f77f4eab7dd Mon Sep 17 00:00:00 2001 From: bkil Date: Tue, 8 Nov 2016 12:00:48 +0100 Subject: [PATCH 2/3] data/presets/presets/man_made/surveillance.json: add some common fields --- data/presets/presets/man_made/surveillance.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/data/presets/presets/man_made/surveillance.json b/data/presets/presets/man_made/surveillance.json index 93101738a..6a8b07ca4 100644 --- a/data/presets/presets/man_made/surveillance.json +++ b/data/presets/presets/man_made/surveillance.json @@ -3,6 +3,15 @@ "geometry": [ "point" ], + "fields": [ + "surveillance", + "surveillance/type", + "camera/type", + "camera/mount", + "camera/direction", + "surveillance/zone", + "contact/webcam" + ], "terms": [ "anpr", "alpr", From c4140bf2b5513f1e5cf336f0405167925715c6f4 Mon Sep 17 00:00:00 2001 From: bkil Date: Sat, 19 Nov 2016 12:16:41 +0100 Subject: [PATCH 3/3] fix up generated files via `npm run build` --- data/presets.yaml | 25 ++++++++++++++ data/presets/fields.json | 68 +++++++++++++++++++++++++++++++++++++++ data/presets/presets.json | 9 ++++++ dist/locales/en.json | 23 +++++++++++++ 4 files changed, 125 insertions(+) diff --git a/data/presets.yaml b/data/presets.yaml index 809e26c7d..1492b54e4 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -206,6 +206,17 @@ en: building_area: # building=* label: Building + camera/direction: + # 'camera:direction=*' + label: Camera direction + # camera/direction field placeholder + placeholder: 90 (degrees clockwise) + camera/mount: + # 'camera:mount=*' + label: Camera mount + camera/type: + # 'camera:type=*' + label: Camera type capacity: # capacity=* label: Capacity @@ -261,6 +272,11 @@ en: construction: # construction=* label: Type + contact/webcam: + # 'contact:webcam=*' + label: Webcam feed URL + # contact/webcam field placeholder + placeholder: 'http://example.com/' content: # content=* label: Contents @@ -1070,6 +1086,15 @@ en: surface: # surface=* label: Surface + surveillance: + # surveillance=* + label: Surveillance kind + surveillance/type: + # 'surveillance:type=*' + label: What is watching + surveillance/zone: + # 'surveillance:zone=*' + label: Zone tactile_paving: # tactile_paving=* label: Tactile Paving diff --git a/data/presets/fields.json b/data/presets/fields.json index f723745d7..c62573f03 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -283,6 +283,34 @@ "type": "combo", "label": "Building" }, + "camera/direction": { + "key": "camera:direction", + "type": "number", + "label": "Camera direction", + "placeholder": "90 (degrees clockwise)" + }, + "camera/mount": { + "key": "camera:mount", + "type": "combo", + "label": "Camera mount", + "options": [ + "pole", + "wall", + "ceiling", + "roof", + "gantry" + ] + }, + "camera/type": { + "key": "camera:type", + "type": "combo", + "label": "Camera type", + "options": [ + "fixed", + "panning", + "dome" + ] + }, "capacity": { "key": "capacity", "type": "number", @@ -335,6 +363,13 @@ "type": "combo", "label": "Type" }, + "contact/webcam": { + "key": "contact:webcam", + "type": "url", + "icon": "website", + "label": "Webcam feed URL", + "placeholder": "http://example.com/" + }, "content": { "key": "content", "type": "combo", @@ -1457,6 +1492,39 @@ "type": "combo", "label": "Surface" }, + "surveillance": { + "key": "surveillance", + "type": "combo", + "label": "Surveillance kind", + "options": [ + "outdoor", + "public", + "indoor" + ] + }, + "surveillance/type": { + "key": "surveillance:type", + "type": "combo", + "label": "What is watching", + "options": [ + "camera", + "guard", + "alpr" + ] + }, + "surveillance/zone": { + "key": "surveillance:zone", + "type": "combo", + "label": "Zone", + "options": [ + "traffic", + "building", + "town", + "parking", + "shop", + "bank" + ] + }, "tactile_paving": { "key": "tactile_paving", "type": "check", diff --git a/data/presets/presets.json b/data/presets/presets.json index 46ebcd5f4..11f8ddb53 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -7004,6 +7004,15 @@ "geometry": [ "point" ], + "fields": [ + "surveillance", + "surveillance/type", + "camera/type", + "camera/mount", + "camera/direction", + "surveillance/zone", + "contact/webcam" + ], "terms": [ "anpr", "alpr", diff --git a/dist/locales/en.json b/dist/locales/en.json index 270693cad..26038e9ce 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -820,6 +820,16 @@ "building": { "label": "Building" }, + "camera/direction": { + "label": "Camera direction", + "placeholder": "90 (degrees clockwise)" + }, + "camera/mount": { + "label": "Camera mount" + }, + "camera/type": { + "label": "Camera type" + }, "capacity": { "label": "Capacity", "placeholder": "50, 100, 200..." @@ -858,6 +868,10 @@ "construction": { "label": "Type" }, + "contact/webcam": { + "label": "Webcam feed URL", + "placeholder": "http://example.com/" + }, "content": { "label": "Contents" }, @@ -1536,6 +1550,15 @@ "surface": { "label": "Surface" }, + "surveillance": { + "label": "Surveillance kind" + }, + "surveillance/type": { + "label": "What is watching" + }, + "surveillance/zone": { + "label": "Zone" + }, "tactile_paving": { "label": "Tactile Paving" },