Skip to content

Route Search API - Road Shape Data

Table Structure

The tables required for route search are as follows

  • Road node (routing.node)
  • Road edge (routing.edge)
  • Risk map (riskmap.*)
  • Risk map metadata (riskmap.metadata)

Road Node

column name data type description
id integer Unique ID (primary key)
geom geometry(Point,4326) Location (to be geom::geography)
geog geography Location (must be a geom::geography)
  • It is recommended to create indexes for the following columns
    • id (primary key)
    • geog
  • Columns other than the above may be defined to provide additional information.

Road Edge

Column Name Data Type Description
id integer Unique ID (primary key)
is_oneway boolean Set to true if one-way from src to dst
src integer Starting node ID (foreign key)
dst integer End node ID (foreign key)
speed real Regulated speed (km/h)
length real Path length (m)
geom geometry(LineString,4326) Path
  • src and dst should point to the id of the corresponding road node table. both ends of geom should match the geom of the road node.
  • The route length can be derived by ST_Length(geom::geography), but for the sake of speed, it should be given as a column.
  • It is recommended to create indexes for the following columns
    • id (primary key)
    • geom
  • You may define columns other than the above to have additional information.

Road Edge Note Information

column name data type description
edge_id integer Edge ID (foreign key)
ord integer Order
direction integer Direction (1: forward, 0: both directions, -1: reverse)
note character varying Note Information
  • ord is used for ordering control when multiple annotations exist for the same edge_id
  • direction is forward direction (1) for notes from src to dst of the edge in question.
  • note must not contain | characters.
    • Note should not contain | characters, because it is returned as a | concatenated string when multiple note information exists.
  • It is recommended to create indexes on the following columns
    • edge_id (foreign key)
      • Note that it is not UNIQUE.
  • You may define columns other than the above to have additional information.

About table names

The table name is resolved by map of the route finding API request parameter as follows.

value of map parameter road node road edge road edge note information
unspecified routing.node routing.edge routing.edge_note
my_road routing.my_road_node routing.my_road_edge routing.my_road_edge_note

Multiple road data may be registered and routing.node, routing.edge, routing.edge_note may be views to the default road data.

Risk Map/Risk Map Metadata

See Creating a Risk Map