You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-2Lines changed: 29 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -473,8 +473,7 @@ A string specifying the UI and behavior of the field. Must be one of the followi
473
473
474
474
*`access` - Block of dropdowns for defining the `access=*` tags on a highway
475
475
*`address` - Block of text and dropdown fields for entering address information (localized for editing location)
476
-
*`roadspeed` - Numeric text field for speed and dropdown for "mph" / "km/h", defaulting to the speed unit used for roads in the feature's region
477
-
*`roadheight` - Numeric text field for height and dropdowns for "m" / "ft" and "in", defaulting to the height unit used for roads in the feature's region
476
+
*`measurement` - Numeric text field for dimensional numbers that have a unit of measurement, such as inches or kilometres-per-hour. The field defaults to the unit of measurement used in the feature's region. See [#measurement](#measurement) for details.
478
477
*`restrictions` - Graphical field for editing turn restrictions
479
478
*`wikidata` - Search field for selecting a Wikidata entity
480
479
*`wikipedia` - Block of fields for selecting a wiki language and Wikipedia page
@@ -740,6 +739,34 @@ Combo field types can accept key-label pairs in the `options` value of the `stri
740
739
741
740
An optional property to reference to the icons of another field, indicated by using that field's name contained in brackets, like `{field}`. This is for example useful when there are multiple variants of fields for the same tag, which should all use the same icons.
742
741
742
+
##### `measurement`
743
+
744
+
Used when `type = measurement`. Defines the unit of measurements that are supported by this field. For example:
745
+
746
+
```json
747
+
{
748
+
"key": "diameter",
749
+
"type": "measurement",
750
+
"measurement": {
751
+
// The dimension being measured. This constrains the permitted units.
752
+
// The ID id defined by CLDR.
753
+
"dimension": "length",
754
+
755
+
"units": {
756
+
// The key defines the ID of the of the unit, as defined by CLDR.
757
+
// The values define the suffix used in the OSM tag value. If there
758
+
// are multiple values, then the first one is the preferred value.
759
+
"meter": ["m"],
760
+
"centimeter": ["cm"],
761
+
"millimeter": [""], // mm is the default unit in OSM, so the tag value should have no suffix.
762
+
"yard": ["yd"]
763
+
}
764
+
}
765
+
}
766
+
```
767
+
768
+
Translations for the `narrow` and `long` form of each unit are bundled into iD-tagging-schema's locale files.
769
+
743
770
### Deprecations
744
771
745
772
Use `deprecated.json` ([Example](https://github.com/openstreetmap/id-tagging-schema/blob/main/data/deprecated.json), [Schema](https://github.com/ideditor/schema-builder/blob/main/schemas/deprecated.json)) to specify tag deprecations.
"description": "A reusable form element for presets",
6
6
"type": "object",
@@ -67,14 +67,13 @@
67
67
"lanes",
68
68
"localized",
69
69
"manyCombo",
70
+
"measurement",
70
71
"multiCombo",
71
72
"networkCombo",
72
73
"number",
73
74
"onewayCheck",
74
75
"radio",
75
76
"restrictions",
76
-
"roadheight",
77
-
"roadspeed",
78
77
"schedule",
79
78
"semiCombo",
80
79
"structureRadio",
@@ -340,11 +339,11 @@
340
339
},
341
340
"additionalProperties": false
342
341
},
343
-
"urlFormat": {
342
+
"urlFormat": {
344
343
"description": "Permalink URL for `identifier` fields. Must contain a {value} placeholder",
345
344
"type": "string"
346
345
},
347
-
"pattern": {
346
+
"pattern": {
348
347
"description": "Regular expression that a valid `identifier` value is expected to match",
349
348
"type": "string"
350
349
},
@@ -364,6 +363,32 @@
364
363
"iconsCrossReference": {
365
364
"description": "A field can reference icons of another by using that field's identifier contained in brackets, like {field}.",
366
365
"type": "string"
366
+
},
367
+
"measurement": {
368
+
"type": "object",
369
+
"description": "defines the units of measurement that this field uses. Only supported by the 'measurement' field type.",
370
+
"properties": {
371
+
"dimension": {
372
+
"type": "string",
373
+
"description": "The corresponding 'dimension' from CLDR",
374
+
"$ref": "./generated/dimension.json"
375
+
},
376
+
"units": {
377
+
"type": "object",
378
+
"description": "Defines the permitted units. The key is the ID used by CLDR. The value is the value used in the OSM tag. If there are multiple values, the first one will be preferred. Use an empty string if the unit is not included in the OSM tag.",
0 commit comments