Version:

/visualize/videoΒΆ

URL: http://GPUDB_IP_ADDRESS:GPUDB_PORT/visualize/video

Creates raster images of data in the given table based on provided input parameters. Numerous parameters are required to call this function. Some of the important parameters are the attributes of the generated images (input parameter bg_color, input parameter width, input parameter height), the collection of table names on which this function is to be applied, for which shapes (point, polygon, tracks) the images are to be created and a user specified session key. This session key is later used to fetch the generated images. The operation is synchronous, meaning that a response will not be returned until the images for all the frames of the video are fully available.

Once the request has been processed then the generated video frames are available for download via WMS using STYLES=cached. In this request the LAYERS parameter should be populated with the session key passed in input parameter session_key of the visualize video request and the FRAME parameter indicates which 0-based frame of the video should be returned. All other WMS parameters are ignored for this mode.

For instance, if a 20 frame video with the session key 'MY-SESSION-KEY' was generated, the first frame could be retrieved with the URL:

and the last frame could be retrieved with:

The response payload provides, among other things, the number of frames which were created.

Input Parameter Description

Name Type Description
table_names array of strings Names of the tables containing the data for various layers of the resulting video.
world_table_names array of strings Optional name of the tables containing the data for the entire track when the input parameter table_names contains only part of the track data, but the entire track has to be rendered. The number of tables should match the number of tables in the input parameter table_names
track_ids array of arrays of strings Tracks from the input parameter table_names to be rendered.
x_column_name string Name of the column containing the x coordinates.
y_column_name string Name of the column containing the y coordinates.
min_x double Lower bound for the x values.
max_x double Upper bound for the x values.
min_y double Lower bound for the y values.
max_y double Upper bound for the y values.
width int Width of the generated image.
height int Height of the generated image.
projection string

Spatial Reference System (i.e. EPSG Code). Default value is 'PLATE_CARREE'. The allowed values are:

  • EPSG:4326
  • PLATE_CARREE
  • 900913
  • EPSG:900913
  • 102100
  • EPSG:102100
  • 3857
  • EPSG:3857
  • WEB_MERCATOR
bg_color long Background color of the generated image.
time_intervals array of arrays of doubles  
video_style string  
session_key string User Provided session key that is later used to retrieve the generated video from the WMS.
style_options map of arrays of strings

Styling options for the image.

Supported Parameters (keys) Parameter Description
do_points

Rasterize point data toggle. Default value is 'true'. The allowed values are:

  • true
  • false
do_shapes

Rasterize shapes toggle. Default value is 'true'. The allowed values are:

  • true
  • false
do_tracks

Rasterize tracks toggle. Default value is 'true'. The allowed values are:

  • true
  • false
pointcolors RGB color value in hex for the points. Default value is 'FF0000'.
pointsizes Size of points. Default value is '3'. The minimum allowed value is 0. The maximum allowed value is 20.
pointshapes

Shape of the point. The allowed values are:

  • none
  • circle
  • square
  • diamond
  • hollowcircle
  • hollowsquare
  • hollowdiamond
  • SYMBOLCODE
shapelinewidths Width of the lines. Default value is '3'. The minimum allowed value is 0. The maximum allowed value is 20.
shapelinecolors RGB color values in hex for the line. Default value is 'FFFF00 '.
shapefillcolors RGB color values in hex for the fill color of the shapes. Use '-1' for no fill. Default value is '-1'.
tracklinewidths Width of the track lines. '0' implies do not draw track lines. Default value is '3'. The minimum allowed value is 0. The maximum allowed value is 20.
tracklinecolors RGB color values for the track lines. Default value is '00FF00'.
trackmarkersizes Size of the track point markers. Default value is '3'. The minimum allowed value is 0. The maximum allowed value is 20.
trackmarkercolors Color of the track point markers. Default value is '0000FF'.
trackmarkershapes

Shape of track point markers. Default value is 'none'. The allowed values are:

  • none
  • circle
  • square
  • diamond
  • hollowcircle
  • hollowsquare
  • hollowdiamond
  • SYMBOLCODE
trackheadcolors Color of track head markers. Default value is 'FFFFFF'.
trackheadsizes Size of track head markers. Default value is '10'. The minimum allowed value is 0. The maximum allowed value is 20.
trackheadshapes

Shape of track head markers. Default value is 'circle'. The allowed values are:

  • none
  • circle
  • square
  • diamond
  • hollowcircle
  • hollowsquare
  • hollowdiamond
  • SYMBOLCODE
options map of strings Optional parameters. Default value is an empty map ( {} ).

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:

Name Type Description
status String 'OK' or 'ERROR'
message String Empty if success or an error message
data_type String 'visualize_video_request' or 'none' in case of an error
data String Empty string
data_str JSON or String

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

Name Type Description
width double Value of input parameter width.
height double Value of input parameter height.
bg_color long Value of input parameter bg_color.
num_frames int Number of frames created.
session_key string Value of input parameter session_key.
data array of bytes Empty string.

Empty string in case of an error.