Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 2.68 KB

ARCHITECTURE.md

File metadata and controls

17 lines (9 loc) · 2.68 KB

Quest data flow

StreetComplete queries external services to find quest candidates.

Every quest type has defined some properties, including Overpass queries. The Overpass instance is queried and responds with OpenStreetMap data matching rules for quest candidates.

Query responses are used to build a local quest database, displayed to the user as markers on the map. Once a user solves a quest, the solution is stored in the local database as a diff. Changes are uploaded to OSM as soon as possible. Changes are made in the OSM database using credentials provided by the user. Edits are grouped into changesets by quest types.

The definition of quests in the program may be simple, with just few parameters and made with reusable blocks, like quest asking whatever toilet is paid. Some definitions are highly complicated, defining special interfaces, using country specific data or involve special processing of data. The quest asking about house number is a good example of a quest handling quite complex situations. For starters, not the entire world has the same numbering system – some countries have block-based addressing or addresses with more than one assigned house number.

Some quests may be based on other data sources. The note quest is based on data directly downloaded from the OSM API. The oneway quest is using an external list of roads likely to be a oneway.

The note quest is also special because part of the answer – photos made by users – is uploaded to a special photo service, as OSM notes do not allow hosting of images directly on OSM servers.

Map

SC downloads the vector tiles used for displaying its map from an external source and renders them using the library tangram-es.