{
  "service": "placeq",
  "description": "Named coastal places near tidal water and a tide station -- beaches, bays, points, straits, islands, reefs, marinas, piers, lighthouses and towns -- as one file an app downloads and searches on the device.",
  "usage": [
    "GET /places          -- what the current file holds: version, count by kind, Overture release, when it was built, its columns",
    "GET /places.tsv.xz   -- the file, with an ETag: send If-None-Match and a month with nothing new is a 304",
    "GET /sources         -- the build's last run, and what each upstream gave"
  ],
  "answer": {
    "file": "Tab-separated UTF-8, compressed with xz, one place per line after a header. About 290,000 places, 8 MB compressed and 40 MB not. Rebuilt monthly, after Overture's release.",
    "search": "There is no search endpoint on purpose: search runs on every keystroke, so it runs on the device, over the file. Fold the query as keys is folded, match each word to the start of a word in keys or near, and rank by score less the log of the distance to the user.",
    "coverage": "A place is in the file when it is within about 1 km of tidal water (5 km for a town, an island, a bay or a strait) and within 25 km of a tideq station."
  },
  "sources": [
    "Overture Maps base and divisions themes: OpenStreetMap's named beaches, bays, capes, straits, islands, reefs, marinas and piers, and its towns, ODbL",
    "Wikidata: lighthouses, and each place's Wikipedia sitelinks, CC0",
    "tideq's catalogue: which places are within 25 km of a tide station"
  ],
  "attribution": "© OpenStreetMap contributors, Overture Maps Foundation; Wikidata",
  "licence": {
    "name": "Open Database License (ODbL) 1.0",
    "url": "https://opendatacommons.org/licenses/odbl/1-0/",
    "note": "The places from Overture Maps are OpenStreetMap data, so this file is a derived database under the ODbL: credit OpenStreetMap contributors wherever it is shown, and share a changed copy of it under the same licence. Wikidata's are CC0."
  },
  "auth": "None. CORS is open, so a browser can call this directly.",
  "terms": "Free, unsupported, not for volume, and as is. Send a User-Agent that names your app. https://almanac.gshaw.ca/#use",
  "repository": "https://github.com/gshaw/almanac/tree/main/services/placeq"
}
