Version:

Web Map Service

This endpoint implements a standard Web Map Service (WMS) interface, where rasterized image tiles can be requested. Unlike other GPUdb endpoints, there are no JSON request/response messages. For WMS, the request parameters are encoded as HTTP parameters in the request URL. A typical GPUdb WMS request would look like:

http://<gpudb.host>:9191/wms
        ?VERSION=1.1.1
        &REQUEST=GetMap
        &SRS=EPSG:4326
        &WIDTH=1024
        &HEIGHT=1024
        &LAYERS=MASTER
        &STYLES=raster
        &TRANSPARENT=TRUE

The requested image will then be returned in the HTTP response message body.

Required Parameters

The following parameters are required in all WMS calls:

Name Description Notes
VERSION WMS Version Must be 1.1.1
REQUEST WMS Request
  • GetMap for getting an image
  • GetCapabilities is also supported
SRS Spatial Reference System (i.e. EPSG code)
  • Plate Carree projection codes: EPSG:4326, PLATE_CARREE.
  • Web Mercator projection codes: 900913, EPSG:900913, 102100, EPSG:102100, 3857, EPSG:3857, WEB_MERCATOR.
  • Defaults to Plate Carree
WIDTH Image width Best performance if width is a power of 2
HEIGHT Image height Best performance if height is a power of 2
LAYERS The requested image layer(s) One or more comma separated GPUdb GUIDs (i.e. table IDs)
STYLES The style of image requested
  • raster
  • cb_raster
  • heatmap
  • cached
TRANSPARENT Controls background transparency of the generated image
  • TRUE for transparent background
  • FALSE for opaque background
FORMAT Output image format Must be image/png
BBOX Geographic bounding box min_longitude, min_latitude, max_longitude, max_latitude [Note that Google Earth adds this in automatically]

Optional Parameters

The following parameters are optional for WMS calls:

Name Description Notes
X_ATTR Name of the attribute to be used as the longitude Must be a numeric attribute in at least one of the sets. Defaults to x if omitted
Y_ATTR Name of the attribute to be used as the latitude Must be a numeric attribute in at least one of the sets. Defaults to y if omitted

Modes

The following modes are supported:

  • RASTER
  • CB_RASTER
  • HEATMAP
  • CACHED

Descriptions of each mode along with the mode-specific parameters can be found below.

RASTER

The raster mode is used to rasterize points, shapes, symbols, and/or tracks from one or more GPUdb tables. Available parameters are:

Name Description Allowable Values Default Value
DOPOINTS Rasterize point data toggle TRUE or FALSE TRUE
DOSHAPES Rasterize shapes toggle TRUE or FALSE TRUE
DOSYMBOLOGY Rasterize symbols toggle TRUE or FALSE FALSE
DOTRACKS Rasterize tracks TRUE or FALSE TRUE
POINTSIZES Size of points 0-20 3
POINTCOLORS Color of points Hex color FF0000 (red)
POINTSHAPES Shape of points
  • none
  • circle
  • square
  • diamond
  • hollowcircle
  • hollowsquare
  • hollowdiamond
  • SYMBOLCODE (to specify a symbol)
 
SHAPELINEWIDTHS Line widths of shapes 0-20 3
SHAPELINECOLORS Line colors for shapes Hex color FFFF00 (yellow)
SHAPEFILLCOLORS Fill color for closed shapes (i.e. polygons) Hex color (or -1 for no fill) -1 (no fill)
TRACKLINEWIDTHS Line widths of tracks 0-20 (0: don't draw the track lines) 3
TRACKLINECOLORS Line colors for tracks Hex color 00FF00 (green)
TRACKMARKERSIZES Size of track point markers 0-20 2
TRACKMARKERCOLORS Color of track point markers Hex color 0000FF (blue)
TRACKMARKERSHAPES Shape of track point markers
  • none
  • circle
  • square
  • diamond
  • hollowcircle
  • hollowsquare
  • hollowdiamond
  • SYMBOLCODE (to specify a symbol)
none
TRACKHEADSIZES Size of track head markers 0-20 10
TRACKHEADCOLORS Color of track head markers Hex color FFFFFF (white)
TRACKHEADSHAPES Shape of track head markers
  • none
  • circle
  • square
  • diamond
  • hollowcircle
  • hollowsquare
  • hollowdiamond
  • SYMBOLCODE (to specify a symbol)
circle

In addition, the WORLDLAYERS parameter can be used if the GPUdb table(s) specified in the LAYERS parameter only have a subset of all track points and the desired behavior is to render the entire track. In this case the unique track ids existing in the LAYERS table(s) will be identified, but the actual track points will be pulled from the WORLDLAYERS table(s).

Styling parameters must be specified for each GPUdb table provided in the LAYERS parameter. For instance, if LAYERS=LAYER1,LAYER2 then to set different point colors for each layer the syntax would be: POINTCOLORS=FF0000,0000FF. In this case points from LAYER1 would be rendered as red while points from LAYER2 would be rendered as blue.

All colors must be provided in hex notation in the format RRGGBB or AARRGGBB (to specify the alpha value). For example, opaque red may be given as FF0000 or FFFF0000.

If using symbology, then the type definition must include an attribute called SYMBOLCODE which is the desired symbol's identifier. All necessary symbols need to be added to GPUdb via the /insert/symbol endpoint.

CB_RASTER

The class break raster mode is for generating class break renderings. A class break rendering is the rasterization of the data from one or more GPUdb tables with styling applied on a per-class basis. GPUdb supports class breaks based on one or more data attributes. Distinct values (for strings) or ranges (for numeric attributes) must be provided in the CB_VALS/CB_VALS1 and CB_VALS2 parameters. In addition to all of the RASTER mode parameters the additional parameters for this mode are:

Name Description Allowable Values
CB_ATTR or CB_ATTR1 First class break attribute Required Any valid attribute name
CB_VALS or CB_VALS1 Values or ranges to apply for the class break Required Comma separated list of values or ranges (e.g. 0:5,5:10,15:30)
CB_ATTR2 List of second class break attributes Optional Comma separated list of valid attribute names. An empty string implies not using more than one attribute for the class break. For a non-empty list, there needs to be as many entries in the list as there are classes for the first attribute. However, the attribute names can be empty to indicate that for the corresponding class of the first attribute, no secondary class break will be applied. All the attribute names in this list must be different from the first attribute (e.g. attr2,attr3,attr2).
CB_VALS2

List of list of values/ranges to apply for the second class break

NOTE: Required only if CB_ATTR2 is used

Comma separated list of []-enclosed lists of values or ranges (e.g. [0:5,5:10],[of,on,so],[-50:-20]). Each square bracket enclosed list describes the secondary classes for the respective attribute in CB_ATTR2 and the respective class in CB_VALS/CB_VALS1.

All of the RASTER-mode styling parameters are valid for CB_RASTER; however, there must be styling parameters specified for each class. If there is a single class break attribute (i.e. CB_ATTR2 is not provided) then the number of classes is the number of entries in CB_VALS/CB_VALS1. If there are more than one class break attributes, then the number of total classes is the sum of the entries (each value/range) in CB_VALS2.

For example, say we wish to render the data in the MY_SET GPUdb table where string attribute named attr1 is equal to either DS1 or DS2, a numeric attribute named x is between [-5,0] or [5,10] for attr1==DS1, and another numeric attribute named y is between [0,42] for attr1==DS2. CB_ATTR/CB_ATTR1 would be attr1, and CB_VALS/CB_VALS1 would be DS1,DS2. CB_ATTR2 would be x,y, and CB_VALS2 would be [-5:0,5:10],[0:42]. We could accomplish this via the WMS request:

http://<gpudb.host>:9191/wms
        ?...
        &LAYERS=MY_SET
        &STYLES=cb_raster
        &CB_ATTR1=attr1
        &CB_VALS1=DS1,DS2
        &CB_ATTR2=x%2Cy
        &CB_VALS2=%5B-5%3A0%2C5%3A10%5D%2C%5B0%3A42%5D
        &POINTCOLORS=FF0000,00FF00,0000FF
        &...

In this case data from the set would be styled such that:

  • attr1=DS1 and x is in the range [-5,0] would have points rendered in red (FF0000)
  • attr1=DS1 and x is in the range [5,10] would have points rendered in green (00FF00)
  • attr1=DS2 and y is in the range [0,42] would have points rendered in blue (0000FF)
  • all other data would not be rendered

HEATMAP

The heatmap mode is used to generate a heat map image of one or more GPUdb tables. Heat maps show the density of data and use a color scheme to differentiate between low and high density areas. Available parameters are:

Name Description Allowable Values Default Value
BLUR_RADIUS Blurring radius for the heat map 1-32 5
COLORMAP Colormap for the heat map
  • jet
  • hot
  • hsv
  • gray
  • blues
  • greens
  • greys
  • oranges
  • purples
  • reds
(none)
GRADIENT_START_COLOR Gradient start color for the heat map Hex color FFFFFF (white)
GRADIENT_END_COLOR Gradient end color for the heat map Hex color FF0000 (red)
VAL_ATTR Attribute to use to calculate the density for the heat map An existing attribute of the type definition (none)

If both COLORMAP and GRADIENT_START_COLOR/GRADIENT_END_COLOR are provided then the COLORMAP is ignored and the user-provided GRADIENT_START_COLOR/GRADIENT_END_COLOR are used as the color scheme. If no VALUE_ATTR_NAME is specified, then the count of data points for any given position will be used to generate the heatmap.

CACHED

The cached mode is intended to be used in conjunction with the /visualize/video and visualize_video_heatmap_rest endpoints. Once one of those endpoints has been called, the generated video frames are available for download via WMS using STYLES=cached. In this case, the LAYERS parameter should be populated with the session key passed in to /visualize/video or visualize_video_heatmap_rest 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 with a call to /visualize/video, the first frame could be retrieved with the URL:

http://<gpudb.host>:9191/wms
        ?REQUEST=GetMap
        &STYLES=cached
        &LAYERS=MY-SESSION-KEY
        &FRAME=0

and the last frame could be retrieved with:

http://<gpudb.host>:9191/wms
        ?REQUEST=GetMap
        &STYLES=cached
        &LAYERS=MY-SESSION-KEY
        &FRAME=19