GIScience / ohsome-api

API for analysing OpenStreetMap history data
https://api.ohsome.org
GNU Affero General Public License v3.0
47 stars 8 forks source link

Change 'groupByObject" to 'groupByObjectId' in JSON response #84

Open bonaparten opened 4 years ago

bonaparten commented 4 years ago

The value of groupByObject in a JSON response represents the ID of the object, not the object itself. groupByObject should be changed to groupByObjectId or something similar.

FabiKo117 commented 4 years ago

Relevant code line: https://github.com/GIScience/ohsome-api/blob/73ce61a590efa7b026a949ab09f380a5f13ef477/src/main/java/org/heigit/ohsome/ohsomeapi/output/dataaggregationresponse/groupbyresponse/GroupByObject.java#L21

in class GroupByObject

tyrasd commented 4 years ago

see also https://github.com/GIScience/ohsome-api/commit/360508a6be35a4b0c2d6a9e731d911f1840d3d9e, https://github.com/GIScience/ohsome-api/pull/57#issuecomment-728838052 and #80

tyrasd commented 4 years ago

what would you do with the multi-groupBy requests, like /groupBy/boundary/groupBy/tag/ for example. currently, those look like this:

    "groupByObject" : [ "Heidelberg", "highway=tertiary" ]

Would you name those groupByObjectIds or groupByObjectsIds perhaps?

FabiKo117 commented 3 years ago

We've decided in a 2.0 release meeting that we want to call this response object simply group for all the /groupBy responses.