Query#

The query is what you use to specify the parameters for a search (or multiple searches) and is in a json format.

Basic#

Here's a very simple example query:

{
  "origin_name": "Government Center Station",
  "destination_name": "Cannonball Creek Brewery",
  "origin_x": -105.200146,
  "origin_y": 39.72657,
  "destination_x": -105.234964,
  "destination_y": 39.768477
}

In this example, note that the keys origin_name and destination_name are completely optional and are only used for documentation purposes. The application does not use them but they do get passed through to the result. You can provide any arbitrary key if you want to pass information through.

The remaining keys are used to define where we should start and end our search:

  • origin_x: The longitude of the origin coordinate

  • origin_y: The latitude of the origin coordinate

  • destination_x: The longitude of the origin coordinate

  • destination_y: The latitude of the origin coordinate

If your configuration includes an energy traversal model, you must also provide a model_key that selects which vehicle model to use. This must match the model_key field of a RouteE Powertrain V2 metadata.json file listed in the energy model's vehicle_input_files, e.g. "model_key": "toyota/camry_ice/2016/rf_base_67ae9982".

Multiple Queries#

In addition to a single query, you can also pass multiple queries into the app and it will run them in parallel according to the parallelism setting in the config

Here's an example:

[
  {
    "origin_x": -105.200146,
    "origin_y": 39.72657,
    "destination_x": -105.234964,
    "destination_y": 39.768477
  },
  {
    "origin_x": -105.234964,
    "origin_y": 39.768477,
    "destination_x": -105.200146,
    "destination_y": 39.72657
  }
]