Version:

visualize_videoΒΆ

GPUdb.visualize_video( table_names = None, world_table_names = None, track_ids =
                       None, x_column_name = None, y_column_name = None,
                       min_x = None, max_x = None, min_y = None, max_y =
                       None, width = None, height = None, projection =
                       'PLATE_CARREE', bg_color = None, time_intervals =
                       None, video_style = None, session_key = None,
                       style_options = None, options = {} )

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 list of str Names of the tables containing the data for various layers of the resulting video.
world_table_names list of str 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 list of lists of str Tracks from the input parameter table_names to be rendered.
x_column_name str Name of the column containing the x coordinates.
y_column_name str Name of the column containing the y coordinates.
min_x float Lower bound for the x values.
max_x float Upper bound for the x values.
min_y float Lower bound for the y values.
max_y float Upper bound for the y values.
width int Width of the generated image.
height int Height of the generated image.
projection str

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 list of lists of floats  
video_style str  
session_key str User Provided session key that is later used to retrieve the generated video from the WMS.
style_options dict of lists of str

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 dict of str Optional parameters. Default value is an empty dict ( {} ).

Output Parameter Description

Name Type Description
width float Value of input parameter width.
height float Value of input parameter height.
bg_color long Value of input parameter bg_color.
num_frames int Number of frames created.
session_key str Value of input parameter session_key.
data list of str Empty string.