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

[API] Consider whether to use GeoJSON for origin/destination locations #54

Open
brylie opened this issue May 22, 2020 · 0 comments
Open

Comments

@brylie
Copy link
Contributor

brylie commented May 22, 2020

We are currently handling API requests that provide an itinerary origin and destination containing latitude/longitude pairs (in WGS84 decimal degrees).

Our current design is tending towards using explicit latitude and longitude properties on a coordinate schema, to avoid ambiguity of the X/Y or Y/X coordinate systems.

GeoJSON defines a, somewhat ambiguous but increasingly adopted, schema in the following form:

  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [125.6, 10.1]
  },
  "properties": {
    "name": "Dinagat Islands"
  }
}

Task

  • determine whether to use GeoJSON for the allowed data structure of origin and destination data
  • if desired, add support for GeoJSON definitions (e.g. by adding an itinerary_option_origin_destination_geojson schema

Resources

The GeoJSON RFC defines the coordinates as follows:

A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.

https://tools.ietf.org/html/rfc7946#section-3.1.1

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

1 participant