/visualize/isochrone

URL: http://<db.host>:<db.port>/visualize/isochrone

Generate an image containing isolines for travel results using an existing graph. Isolines represent curves of equal cost, with cost typically referring to the time or distance assigned as the weights of the underlying graph. See Network Graphs & Solvers for more information on graphs.

Input Parameter Description

NameTypeDescription
graph_namestringName of the graph on which the isochrone is to be computed.
source_nodestringStarting vertex on the underlying graph from/to which the isochrones are created.
max_solution_radiusdoubleExtent of the search radius around input parameter source_node. Set to '-1.0' for unrestricted search radius. The default value is -1.0.
weights_on_edgesarray of stringsAdditional weights to apply to the edges of an existing graph. Weights must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS WEIGHTS_EDGE_ID', or expressions, e.g., 'ST_LENGTH(wkt) AS WEIGHTS_VALUESPECIFIED'. Any provided weights will be added (in the case of 'WEIGHTS_VALUESPECIFIED') to or multiplied with (in the case of 'WEIGHTS_FACTORSPECIFIED') the existing weight(s). The default value is an empty array ( [] ).
restrictionsarray of stringsAdditional restrictions to apply to the nodes/edges of an existing graph. Restrictions must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS RESTRICTIONS_EDGE_ID', or expressions, e.g., 'column/2 AS RESTRICTIONS_VALUECOMPARED'. If remove_previous_restrictions is set to true, any provided restrictions will replace the existing restrictions. If remove_previous_restrictions is set to false, any provided restrictions will be added (in the case of 'RESTRICTIONS_VALUECOMPARED') to or replaced (in the case of 'RESTRICTIONS_ONOFFCOMPARED'). The default value is an empty array ( [] ).
num_levelsintNumber of equally-separated isochrones to compute. The default value is 1.
generate_imageboolean

If set to true, generates a PNG image of the isochrones in the response. The default value is true. The supported values are:

  • true
  • false
levels_tablestringName of the table to output the isochrones to, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. The table will contain levels and their corresponding WKT geometry. If no value is provided, the table is not generated. The default value is ''.
style_optionsmap of string to strings

Various style related options of the isochrone image.

Supported Parameters (keys)Parameter Description
line_sizeThe width of the contour lines in pixels. The default value is '3'.The minimum allowed value is 0. The maximum allowed value is 20.
colorColor of generated isolines. All color values must be in the format RRGGBB or AARRGGBB (to specify the alpha value). If alpha is specified and flooded contours are enabled, it will be used for as the transparency of the latter.This parameter is parsed by GPUdb as long. The default value is 'FF696969'.
bg_colorWhen input parameter generate_image is set to true, background color of the generated image. All color values must be in the format RRGGBB or AARRGGBB (to specify the alpha value)This parameter is parsed by GPUdb as long. The default value is '00000000'.
text_colorWhen add_labels is set to true, color for the labels. All color values must be in the format RRGGBB or AARRGGBB (to specify the alpha value)This parameter is parsed by GPUdb as long. The default value is 'FF000000'.
colormap

Colormap for contours or fill-in regions when applicable. All color values must be in the format RRGGBB or AARRGGBB (to specify the alpha value) The default value is jet. The supported values are:

  • jet
  • accent
  • afmhot
  • autumn
  • binary
  • blues
  • bone
  • brbg
  • brg
  • bugn
  • bupu
  • bwr
  • cmrmap
  • cool
  • coolwarm
  • copper
  • cubehelix
  • dark2
  • flag
  • gist_earth
  • gist_gray
  • gist_heat
  • gist_ncar
  • gist_rainbow
  • gist_stern
  • gist_yarg
  • gnbu
  • gnuplot2
  • gnuplot
  • gray
  • greens
  • greys
  • hot
  • hsv
  • inferno
  • magma
  • nipy_spectral
  • ocean
  • oranges
  • orrd
  • paired
  • pastel1
  • pastel2
  • pink
  • piyg
  • plasma
  • prgn
  • prism
  • pubu
  • pubugn
  • puor
  • purd
  • purples
  • rainbow
  • rdbu
  • rdgy
  • rdpu
  • rdylbu
  • rdylgn
  • reds
  • seismic
  • set1
  • set2
  • set3
  • spectral
  • spring
  • summer
  • terrain
  • viridis
  • winter
  • wistia
  • ylgn
  • ylgnbu
  • ylorbr
  • ylorrd
solve_optionsmap of string to strings

Solver specific parameters. The default value is an empty map ( {} ).

Supported Parameters (keys)Parameter Description
remove_previous_restrictions

Ignore the restrictions applied to the graph during the creation stage and only use the restrictions specified in this request if set to true. The default value is false. The supported values are:

  • true
  • false
restriction_threshold_valueValue-based restriction comparison. Any node or edge with a 'RESTRICTIONS_VALUECOMPARED' value greater than the restriction_threshold_value will not be included in the solution.
uniform_weightsWhen specified, assigns the given value to all the edges in the graph. Note that weights provided in input parameter weights_on_edges will override this value.
contour_optionsmap of string to strings

Solver specific parameters. The default value is an empty map ( {} ).

Supported Parameters (keys)Parameter Description
projection

Spatial Reference System (i.e. EPSG Code). The default value is PLATE_CARREE. The supported values are:

  • 3857
  • 102100
  • 900913
  • EPSG:4326
  • PLATE_CARREE
  • EPSG:900913
  • EPSG:102100
  • EPSG:3857
  • WEB_MERCATOR
widthWhen input parameter generate_image is set to true, width of the generated image. The default value is '512'.
heightWhen input parameter generate_image is set to true, height of the generated image. If the default value is used, the height is set to the value resulting from multiplying the aspect ratio by the width. The default value is '-1'.
search_radiusWhen interpolating the graph solution to generate the isochrone, neighborhood of influence of sample data (in percent of the image/grid). The default value is '20'.
grid_sizeWhen interpolating the graph solution to generate the isochrone, number of subdivisions along the x axis when building the grid (the y is computed using the aspect ratio of the output image). The default value is '100'.
color_isolines

Color each isoline according to the colormap; otherwise, use the foreground color. The default value is true. The supported values are:

  • true
  • false
add_labels

If set to true, add labels to the isolines. The default value is false. The supported values are:

  • true
  • false
labels_font_sizeWhen add_labels is set to true, size of the font (in pixels) to use for labels. The default value is '12'.
labels_font_familyWhen add_labels is set to true, font name to be used when adding labels. The default value is 'arial'.
labels_search_windowWhen add_labels is set to true, a search window is used to rate the local quality of each isoline. Smooth, continuous, long stretches with relatively flat angles are favored. The provided value is multiplied by the labels_font_size to calculate the final window size. The default value is '4'.
labels_intralevel_separationWhen add_labels is set to true, this value determines the distance (in multiples of the labels_font_size) to use when separating labels of different values. The default value is '4'.
labels_interlevel_separationWhen add_labels is set to true, this value determines the distance (in percent of the total window size) to use when separating labels of the same value. The default value is '20'.
labels_max_angleWhen add_labels is set to true, maximum angle (in degrees) from the vertical to use when adding labels. The default value is '60'.
optionsmap of string to strings

Additional parameters. The default value is an empty map ( {} ).

Supported Parameters (keys)Parameter Description
solve_tableName of the table to host intermediate solve results, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. This table will contain the position and cost for each vertex in the graph. If the default value is used, a temporary table is created and deleted once the solution is calculated. The default value is ''.
is_replicated

If set to true, replicate the solve_table. The default value is true. The supported values are:

  • true
  • false
data_min_xLower bound for the x values. If not provided, it will be computed from the bounds of the input data.
data_max_xUpper bound for the x values. If not provided, it will be computed from the bounds of the input data.
data_min_yLower bound for the y values. If not provided, it will be computed from the bounds of the input data.
data_max_yUpper bound for the y values. If not provided, it will be computed from the bounds of the input data.
concavity_levelFactor to qualify the concavity of the isochrone curves. The lower the value, the more convex (with '0' being completely convex and '1' being the most concave). The default value is '0.5'.The minimum allowed value is 0. The maximum allowed value is 1.
use_priority_queue_solvers

sets the solver methods explicitly if true The default value is false.

Supported ValuesDescription
trueuses the solvers scheduled for 'shortest_path' and 'inverse_shortest_path' based on solve_direction
falseuses the solvers 'priority_queue' and 'inverse_priority_queue' based on solve_direction
solve_direction

Specify whether we are going to the source node, or starting from it. The default value is from_source.

Supported ValuesDescription
from_sourceShortest path to get to the source (inverse Dijkstra)
to_sourceShortest path to source (Dijkstra)

Output Parameter Description

The GPUdb 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:

NameTypeDescription
statusString'OK' or 'ERROR'
messageStringEmpty if success or an error message
data_typeString'visualize_isochrone_response' or 'none' in case of an error
dataStringEmpty string
data_strJSON or String

This embedded JSON represents the result of the /visualize/isochrone endpoint:

NameTypeDescription
widthintWidth of the image as provided in width.
heightintHeight of the image as provided in height.
bg_colorlongBackground color of the image as provided in bg_color.
image_databytesGenerated contour image data.
infomap of string to stringsAdditional information.
solve_infomap of string to stringsAdditional information.
contour_infomap of string to stringsAdditional information.

Empty string in case of an error.