From 8117252b7fcafe5eaee5d73727301ed2f533bb18 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 13 Mar 2013 11:45:02 -0700 Subject: [PATCH] Editing presets README --- data/presets/README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/data/presets/README.md b/data/presets/README.md index 32b6f3580..7a152eef0 100644 --- a/data/presets/README.md +++ b/data/presets/README.md @@ -5,9 +5,9 @@ preset definitions and simple structure. ## Individual Presets -Specific presets are located under `data/presets/presets`. For convenience, -they're stored in sub-directories like `data/presets/presets/leisure/park.json`, -but these have no effect on their final functionality. +Specific presets are located under `data/presets/presets`. They're organized in a +directory hierarchy based on OSM key/value pairs. For example, the preset that matches +the tag `leisure=park` is in the file `data/presets/presets/leisure/park.json`. ## Preset Format @@ -67,8 +67,18 @@ In which `type` is the fields's type. Valid field types are * address * defaultcheck - a checkbox that can be yes, no, or null - not filled +The `key` property names the OSM key that the field will edit. Alternatively, for +compound fields like `address`, you can specify an array of keys in the `keys` +property. + +Each field definition lives in a separate file in `data/presets/fields`. The field +name (used in the preset `fields` property) is the name of the file (minus the `.json` +extension). + ## Building -Presets are built with the `build.js` script in iD's root. `build.js` combines -all presets together with imagery data, deprecated and discarded tags into -one file, `data/data.js`. +To build presets, all you need to to is run `make`. + +This command will take care of running the build script, which packages all presets +together with imagery data, and deprecated or discarded tags into one file, `data/data.js`, +which is included in the packaged iD.js file.