GIScience / ohsome-now-stats-service

This is the REST service for the ohsomeNow stats.
https://stats.now.ohsome.org/api/
GNU Affero General Public License v3.0
4 stars 1 forks source link

document unit of returned length values #10

Closed tyrasd closed 1 year ago

tyrasd commented 1 year ago

there's apparently a "bug" in the currently implemented endpoints, as the returned values for road lengths don't appear to be plausible. compare /api/stats_static with /api/stats/missingmaps:

{
  "changesets": 65009011,
  "roads": 45964973.0494135
  [snip]
  "hashtag": "*"
}

vs.

{
  "changesets": 4111337,
  "roads": 6900894892.095706,
  [snip]
  "hashtag": "missingmaps"
}

The second number (6.9 billion "length units") is much larger than the first number (45 million "length units"), which is not a possible outcome, as the second query should be a strict subset of the first one. Other returned values (e.g. number of users or buildings are plausible, though).

I assume this is caused by not returning the same "length unit" by both endpoints: the second one might be "meters" while the first might be in "kilometers".


Also, we should document which unit the returned values are in, such that data consumers can display the value in the correct unit.

mmerdes commented 1 year ago

Good call - thanks for raising the issue, @tyrasd. The static data is a verbatim copy of a response of the existing system. So, yes, the units are off and should be aligned (and documented!)

ElJocho commented 1 year ago

We have now decided to mirror the osm-stats unit for roads, which is kilometer