Skip to content

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

Description

@brylie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions