1
0
Fork
You've already forked Quest-Index
0
An index of popular OpenStreetMap quest questions.
  • JavaScript 60.5%
  • HTML 39.5%
2026年05月03日 04:00:04 +02:00
data/quests Initial Quest Index release 2026年05月02日 21:42:53 -04:00
dist Initial Quest Index release 2026年05月02日 21:42:53 -04:00
schema Initial Quest Index release 2026年05月02日 21:42:53 -04:00
scripts Initial Quest Index release 2026年05月02日 21:42:53 -04:00
.editorconfig Initial Quest Index release 2026年05月02日 21:42:53 -04:00
.gitattributes Initial Quest Index release 2026年05月02日 21:42:53 -04:00
.gitignore Initial Quest Index release 2026年05月02日 21:42:53 -04:00
CONTRIBUTING.md Initial Quest Index release 2026年05月02日 21:42:53 -04:00
index.html Update index.html 2026年05月03日 04:00:04 +02:00
LICENSE.md Initial Quest Index release 2026年05月02日 21:42:53 -04:00
package.json Initial Quest Index release 2026年05月02日 21:42:53 -04:00
README.md Update README.md 2026年05月03日 03:54:11 +02:00

Quest Index

Quest Index is a static data index for OpenStreetMap survey quests. It stores plain-English quest metadata, applicability tags, location bounds, expected answer shapes, and the OSM tag edits implied by common answers.

What Is Included

  • data/quests/*.json contains the source quest data, grouped by primary OSM key such as amenity, highway, or shop.
  • schema/quest-category.json documents the JSON shape.
  • scripts/validate.mjs performs structural and local logic checks.
  • scripts/build.mjs builds dist/quest-index.json and dist/quest-index-data.js.
  • scripts/audit-tags.mjs checks all referenced OSM keys and key/value pairs against Taginfo.
  • index.html is the static Suggest-A-Quest form.
  • browse.html is the static human-readable quest browser.

Data Layout

Quest files live at:

data/quests/<primary-key>.json

Each file has a properties.path and an items array:

{
 "properties": {
 "path": "quests/highway"
 },
 "items": [
 {
 "id": "crossing-island",
 "displayName": "Crossing island",
 "question": "Does this crossing have an island?",
 "type": "bool",
 "icon": "person_walking_on_crosswalk",
 "answerKey": "crossing:island",
 "locationSet": { "include": ["001"] },
 "includeTags": [{ "highway": "crossing" }],
 "excludeTags": [{ "crossing:island": true }]
 }
 ]
}

Each key-level file can hold any quests whose intended scope is primarily keyed by that OSM key.

Quest Fields

displayName is a short plain-English label.

question is the plain-English question shown to the mapper.

type describes the answer shape:

  • bool: a yes/no quest. It requires answerKey; yes and no answers are implied and otherAnswersAcceptable is always false.
  • list: one answer from a finite list.
  • multi: one or more answers from a finite list. Consumers normally write multiple selected values as semicolon-delimited OSM values when the answers share one answerKey.
  • number: an integer or decimal value written directly to answerKey.
  • text: freeform text written directly to answerKey, including structured strings such as opening_hours.
  • exists: a feature-existence check that does not write a key/value tag.

icon is a required Pinhead icon ID from pinhead.ink. Store the bare icon ID, such as box_truck.

answerKey is the default OSM key edited by the quest.

locationSet follows Country Coder conventions. Use 001 for worldwide and specific country or region codes only when the question is truly location-bound.

includeTags is an OR list of accepted tag groups. Each object is an AND group.

excludeTags is an OR list of rejected tag groups. If any group matches, the quest should be suppressed.

Tag values may be:

  • "value" for an exact key/value match.
  • ["a", "b"] for any listed value.
  • true for key exists with any value.
  • false for key is absent.
  • null inside an array to allow a missing key.

For example:

"includeTags": [
 { "amenity": "parking", "parking": [null, "yes"] },
 { "parking": "street_side", "parking:lane": [null, "yes"] }
]

answers lists common answer choices for list and multi quests. In the common case, use value and let it apply to the quest's answerKey.

{
 "answerKey": "parking",
 "answers": [
 { "id": "surface", "displayName": "Parking lot", "value": "surface" },
 { "id": "underground", "displayName": "Underground garage", "value": "underground" }
 ]
}

An answer may override the edited key with key, write several tags with tags, or remove keys with removeKey / removeTags.

otherAnswersAcceptable means OSM commonly accepts values beyond the listed choices, even if a consuming app does not expose a free-form answer.

Checks

Run structural and local logic checks:

node scripts/validate.mjs

Build the distributable files:

node scripts/build.mjs

Run the full local check used before publishing:

node scripts/validate.mjs && node scripts/build.mjs

Run the live Taginfo audit when tag keys or values changed:

node scripts/audit-tags.mjs

When npm is available, the equivalent commands are:

npm run check
npm run audit:tags

The build also loads Country Coder location metadata. If metadata loads successfully, unknown location codes fail the build.

Static Sites

Open index.html to use Suggest-A-Quest.

Open browse.html to view the searchable quest table. The browser reads dist/quest-index-data.js, so rebuild before publishing.

License

Quest Index is released under CC0 1.0 Universal. See LICENSE.md.