Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route /traces #6

Closed
vgeorge opened this issue Sep 26, 2019 · 7 comments
Closed

Route /traces #6

vgeorge opened this issue Sep 26, 2019 · 7 comments

Comments

@vgeorge
Copy link
Member

vgeorge commented Sep 26, 2019

Endpoint for GPX traces related actions. I believe we need to validate the schema at #4 before detailing this.

@vgeorge
Copy link
Member Author

vgeorge commented Sep 30, 2019

Actions for traces:

  • GET: Returns trace as GeoJSON, with meta included in properties. In order to allow opening the trace in JOSM, this method should also accept an optional format=osm query parameter to allow passing a OSM XML URL to import command of JOSM Remote Control
  • POST: Creates a new trace from a GeoJSON feature
  • PUT: Probably not supported, if there will be no label or other properties for traces (see Data schema #4)
  • DELETE: Remove trace

@batpad
Copy link
Member

batpad commented Sep 30, 2019

POST: Creates a new trace from a valid GPX file

I'm more inclined to have the POST format to match the default GET GeoJSON format - it seems a bit more straightforward on the client and probably easier to parse. Then we export either osm or gpx formats only when requested as such, but stick to the GeoJSON format as the default interchange? @geohacker @vgeorge do you have strong feelings either way about this?

@geohacker
Copy link
Member

Yeah I agree to keep POST and GET requests consistent with the format. We would have a geojson on the clientside as we want to show the trace on mapbox gl so posting that directly makes sense to me and we can convert them to gpx / osm on the API?

@vgeorge
Copy link
Member Author

vgeorge commented Oct 2, 2019

Ok, I've changed the POST method to accept a GeoJSON feature. Should we adopt tracejson for that?

@batpad
Copy link
Member

batpad commented Oct 2, 2019

Should we adopt tracejson for that?

I am in favour of using the tracejson format, yes.

@geohacker
Copy link
Member

TraceJSON sounds good to me!

@vgeorge
Copy link
Member Author

vgeorge commented Oct 16, 2019

Implemented by #16.

@vgeorge vgeorge closed this as completed Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants