Sophox / sophox

A collection of services exposing OSM data, metadata, and other microservices
Apache License 2.0
31 stars 5 forks source link

Feature/Data Request: changeset #19

Open pyrog opened 3 years ago

pyrog commented 3 years ago

How a changeset could be stored

Example with changeset #88816015

osmchangeset:88816015  osmm:type           'c'
osmchangeset:88816015  osmt:source         'Bing'
osmchangeset:88816015  osmt:created_by     'JOSM/1.5 (16731 fr)'
osmchangeset:88816015  osmt:comment        'Update movie theater — Briançon'
osmchangeset:88816015  osmm:has            osmnode:7775570049  # changeset contains node #7775570049
osmchangeset:88816015  osmnode:7775570049  'create'            # node #7775570049 was created

Example get all editors used in OSM.

SELECT ?editor (COUNT(?editor) AS ?count) WHERE {
  ?id osmm: type 'c' ;
      osmt:created_by ?editor  .
}
GROUP BY ?name
ORDER BY DESC(?count) ?name
1ec5 commented 3 years ago

Storing changeset metadata would make Sophox a convenient and much more performant alternative to OSMCha for certain use cases, such as determining how many people contributed to a tasking manager project over time. Storing changeset contents sounds more challenging, but it allow for even more in-depth queries. For example, these import cleanup queries could verify the assumptions it currently makes about what came before a certain bot edit.

1ec5 commented 3 years ago

Every changeset includes a bounding box as metadata, so it would become possible to visualize the distribution of changeset bbox sizes (hat tip to @b-jazz).