Parameters

KeyTypeOptionalDescription
vehiclevehicle objectNDescribes the vehicle and its attributes for estimating travel times. The fastest response times will be with vehicle type car.
locationsarray of locationsNRepresents the points of interest to be used for the matrix. Currently latitude and longitude must be specified so that addresses must first be geocoded.
sourcesarray of intsYIf the full n x n matrix is not desired, sources and destinations arrays can be used to provide the indices of the locations that are sources/destinations. All indices must be in {0,1,2,…,n-1} and only paths from a source to a destination will be provided. Note that both sources and destinations, should both be used or not at all.
destinationsarray of intsYSee above.
num_neighborsintYIf provided, the response will only contain information about paths from any location to its nearest num_neighbors destinations.
max_travel_timedoubleYReturns only those travel times that are less than max_travel_time across all traffic windows.
start_local_timestringYStart local time in hh:mm:ss format. Used in conjunction with end_local_time parameter.
end_local_timestringYEnd local time in hh:mm:ss format – both start and end local time must be given. In this case, we only return info on the traffic windows that are “touched” by this interval. User must supply both start_local_time and end_local_time.
weekendbooleanYIf true, MARE defaults to the fastest available traffic window corresponding to weekend/free flow traffic patterns. If unspecified, MARE defaults to false and returns the travel time for multiple traffic windows, depending on whether start_local_time and end_local_time are provided.
radiusintYBy default, MARE looks for the nearest street segment within 1500 meters of the lat/long. This can be changed to a different value if desired by specifying a new value in meters. Can be useful in rural and other areas where not all streets are included in the map data.
force_containmentboolYIf provided along with location_classes for sources and destinations, then MARE only returns information for source-destination pairs where the source location classes completely contain the destination location classes.

location

KeyTypeOptionalDescription
location_idstringNA unique string identifier for each location object.
latitude
double
NThe latitude value for the location object.
longitude
double
NThe longitude value for the location object.
location_classarray of ints
YIf provided, then MARE associates a set of classes with this location. This can be used to reduce the size of the response. If a location_class array is provided for both a source and destination location, then we only include the travel costs if the intersection of the source location_class and destination location_class is non-empty. This behavior can be further modified by using the force_containment boolean parameter. For example, a source might be a plumber or an electrician, and a destination would be a job that requires a plumber or electrician. So the location_class allows one to filter the matrix so that only relevant paths are returned based on attributes of the locations.

vehicle

KeyTypeOptionalDescription
typestring
N
Can be one of:
car, truck, bicycle, pedestrian. Additional options are allowed if truck is chosen.
num_axlesintYDescribes vehicle properties in order to restrict routing to allowable roads (truck only).
heightdouble
Y
Vehicle height in meters (truck only).
lengthdouble
YVehicle length in meters (truck only).
width
doubleYVehicle width in meters (truck only).
weightdouble
YVehicle weight in kilograms (truck only).
hazmat
boolean
Y
True if this vehicle is subject to hazmat restrictions (truck only).