Skip to main content
URL: http://<db.host>:<db.port>/match/graph
Matches a directed route implied by a given set of latitude/longitude points to an existing underlying road network graph using a given solution type. IMPORTANT: It’s highly recommended that you review the Graphs and Solvers concepts documentation, the Graph REST Tutorial, and/or some /match/graph examples before using this endpoint.

Input Parameter Description

graph_name
string
Name of the underlying geospatial graph resource to match to using input parameter sample_points.
sample_points
array of strings
Sample points used to match to an underlying geospatial graph. Sample points must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with: existing column names, e.g., ‘table.column AS SAMPLE_X’; expressions, e.g., ‘ST_MAKEPOINT(table.x, table.y) AS SAMPLE_WKTPOINT’; or constant values, e.g., ‘{1, 2, 10} AS SAMPLE_TRIPID’.
solve_method
string
The type of solver to use for graph matching.The default value is markov_chain.
  • markov_chain: Matches input parameter sample_points to the graph using the Hidden Markov Model (HMM)-based method, which conducts a range-tree closest-edge search to find the best combinations of possible road segments (num_segments) for each sample point to create the best route. The route is secured one point at a time while looking ahead chain_width number of points, so the prediction is corrected after each point. This solution type is the most accurate but also the most computationally intensive. Related options: num_segments and chain_width.
  • match_od_pairs: Matches input parameter sample_points to find the most probable path between origin and destination pairs with cost constraints.
  • match_supply_demand: Matches input parameter sample_points to optimize scheduling multiple supplies (trucks) with varying sizes to varying demand sites with varying capacities per depot. Related options: partial_loading and max_combinations.
  • match_batch_solves: Matches input parameter sample_points source and destination pairs for the shortest path solves in batch mode.
  • match_loops: Matches closed loops (Eulerian paths) originating and ending at each graph node within min and max hops (levels).
  • match_charging_stations: Matches an optimal path across a number of ev-charging stations between source and target locations.
  • match_similarity: Matches the intersection set(s) by computing the Jaccard similarity score between node pairs.
  • match_pickup_dropoff: Matches the pickups and dropoffs by optimizing the total trip costs.
  • match_clusters: Matches the graph nodes with a cluster index using Louvain clustering algorithm.
  • match_pattern: Matches a pattern in the graph.
  • match_embedding: Creates vector node embeddings.
  • match_isochrone: Solves for isochrones for a set of input sources.
  • match_route_detour: Computes detour costs for nearby stations at a mark point along each source-target route.
solution_table
string
The name of the table used to store the results, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. This table contains a track of geospatial points for the matched portion of the graph, a track ID, and a score value. Also outputs a details table containing a trip ID (that matches the track ID), the latitude/longitude pair, the timestamp the point was recorded at, and an edge ID corresponding to the matched road segment. Must not be an existing table of the same name.The default value is ”.
options
map of string to strings
Additional parameters.The default value is an empty map ( {} ).

Output Parameter Description

The Kinetica server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:
status
String
‘OK’ or ‘ERROR’
message
String
Empty if success or an error message
data_type
String
‘match_graph_response’ or ‘none’ in case of an error
data
String
Empty string
data_str
JSON or String
This embedded JSON represents the result of the /match/graph endpoint:Empty string in case of an error.