Closed arnesetzer closed 6 months ago
Thank you for this! Geojson responses are something I would love to support. I have a few changes I'd like to make to your implementation though: I'll try and get to these over the next few weeks
FeatureCollection
of Point
, rather than a LineString
. OTD can return a single point, whereas a LineString is only valid for 2 or more points. Also a LineString
can't have individual properties.type
key) and removing the status
key.So the complete response would be something like
{ "type": "FeatureCollection",
"features": [
{ "type": "Feature",
"geometry": {"type": "Point", "coordinates": [122.1, -42.1, 1234]},
"properties": {"dataset": "test-dataset"}
},
{ "type": "Feature",
"geometry": {"type": "Point", "coordinates": [122.2, -42.1, 2345]},
"properties": {"dataset": "test-dataset"}
}
]
}
Would such a format still be useful for you?
Hi, thanks for your input. I'm working on it.
Would such a format still be useful for you?
Not really, but I already minimized the API to my needs (remove CORS-check, only allow POST jsonised, hardcoded values, etc.) so it doesn't matter 😄
Love the Lat-Lon or Lon-Lat discussion 😅
make test
finishes without any errors, but I'm not familiar enough with pytest to write tests for the new case
Ready for review 😄
Amazing thank you! I have seen this, will get it merged as soon as life allows.
@ajnisbet Any news here? 😃
Heyo, I needed the geojson format for my project and thought it might be useful for someone else. The parameter is set via config.yaml so that the format of the API can't be changed by mistake.