URL: http://GPUDB_IP_ADDRESS:GPUDB_PORT/wms
Kinetica provides a Web Map Service (WMS) for generating image tiles from
the geospatial data contained in it. The type of image tiles returned, the data
used to generate the tiles, and the graphical styles in the tiles are specified
in the query string of the WMS call. These would typically be used as
overlays on top of a map. Examples of this can be seen in the demo that comes
bundled with Kinetica at http://<host>:8080/gaiademo
. Any table with x,y
coordinates or WKT shapes can be used as the source for generating images.
Note that the cb_raster
and raster
styles have a GEO_ATTR
parameter
that allows specifying the name of a geometry (WKT) column to use during
rendering. This parameter is optional as Kinetica will automatically find
a geometry column, but if there's multiple geometry columns and a specific
column needs to be used, GEO_ATTR
is necessary. If the specified
GEO_ATTR
column exists and is a geometry-type column, Kinetica will
continue with rendering. If the column does not exist or it is not a
geometry-type column, Kinetica will try to process the column as point or
track data instead.
Important
If GEO_ATTR
is not specified and there's more than one
geometry column, Kinetica will attempt to process the columns
as point or track data.
The requested image is then returned in the HTTP response message body.
The examples below use the following tables:
nyc_neighborhood
flights
(downloadable via GAdmin)nyctaxi
(downloadable via GAdmin)The following parameters are required in all WMS calls:
Name | Description | Allowable Values |
---|---|---|
REQUEST |
WMS Request |
|
SRS |
Spatial Reference System (i.e. EPSG code) |
|
LAYERS |
The requested image layer(s) | One or more comma-separated table names |
BBOX |
Geographic bounding box as a comma-separated list of: min_longitude, min_latitude, max_longitude, max_latitude | Four comma-separated numerics |
WIDTH |
Image width, in pixels; best performance if a power of 2 | 64 - 8192 |
HEIGHT |
Image height, in pixels; best performance if a power of 2 | 64 - 8192 |
The following parameters are optional for WMS calls:
Name | Description | Allowable Values | Default Value |
---|---|---|---|
VERSION |
WMS Version--only v1.1.1 is supported | 1.1.1 |
1.1.1 |
STYLES |
The mode of image requested |
|
raster |
FORMAT |
Output image format--only PNG is supported | image/png |
image/png |
TRANSPARENT |
Controls background transparency of the generated image |
|
TRUE |
X_ATTR |
Name of the column to be used as the longitude | Numeric column from LAYERS source table list;
must be of int, double, float, or long
column type |
Column x |
Y_ATTR |
Name of the column to be used as the latitude | Numeric column from LAYERS source table list;
must be of int, double, float, or long
column type |
Column y |
GEO_ATTR |
The WKT attribute used to render the raster/cb_raster (particularly if you have more than one WKT column in the table) | A WKT column name |
The following modes are supported, as specified by the STYLES
parameter:
Descriptions of each mode along with the mode-specific parameters can be found below.
The raster mode is used to rasterize points, shapes, symbols, and/or tracks from one or more 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 |
HASHLINEANGLES |
Clockwise rotation angle from a perpendicular hash line in degree | Real numbers | 0 |
HASHLINECOLORS |
RBG color values in hex for the hash lines | Hex color (or -1 for same color as shapeline) |
SHAPELINECOLOR
value |
HASHLINEINTERVALS |
Distance between the center points of hash lines in pixels | Positive integers | 20 |
HASHLINELENS |
Length of hash lines in pixels. Inputting a
0 disables hash lines |
Non-negative integers | 0 |
HASHLINEWIDTHS |
Width of hash lines in pixels | Positive integers | 3 |
ORDER_LAYERS |
Enables layers to be rendered in the order they were specified in | true or false |
|
POINTCOLORS |
Color of points | Hex color | FF0000 (red) |
POINTOFFSET_X |
Horizontal offset for point location in pixels | Signed integers | 0 |
POINTOFFSET_Y |
Vertical offset for point location in pixels | Signed integers | 0 |
POINTSHAPES |
Shape of points |
|
|
POINTSIZES |
Size of points | 0 - 20 |
3 |
SHAPEFILLCOLORS |
Fill color for closed shapes (i.e. polygons) | Hex color (or -1 for no fill) |
-1 (no fill) |
SHAPELINECOLORS |
Line colors for shapes | Hex color | FFFF00 (yellow) |
SHAPELINEPATTERNLENS |
Lengths of dashed-line patterns in number of bits | 1 - 64 |
0 |
SHAPELINEPATTERNS |
Bitmaps representing dashed-line patterns;
bits of 1 enable the pixels associated
with them, but if all bits are 0 ,
dashed-line drawing is disabled, i.e. solid
lines are drawn |
Unsigned 64-bit (hexadecimal) integers | 0 |
SHAPELINEWIDTHS |
Line widths of shapes | 0 - 20 |
3 |
SYMBOLROTATIONS |
Angle in degree for clockwise symbol rotation | Numeric constants or expressions (including column names) | |
TRACKHEADCOLORS |
Color of track head markers | Hex color | FFFFFF (white) |
TRACKHEADSHAPES |
Shape of track head markers |
|
circle |
TRACKHEADSIZES |
Size of track head markers | 0 - 20 |
10 |
TRACKLINECOLORS |
Line colors for tracks | Hex color | 00FF00 (green) |
TRACKLINEWIDTHS |
Line widths of tracks | 0 - 20 (0 : don't draw the track lines) |
3 |
TRACKMARKERCOLORS |
Color of track point markers | Hex color | 0000FF (blue) |
TRACKMARKERSHAPES |
Shape of track point markers |
|
none |
TRACKMARKERSIZES |
Size of track point markers | 0 - 20 |
2 |
Important
The WORLDLAYERS
parameter can be used if the 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 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. If styling parameters are not provided for
a layer, the default value is applied.
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
.
To use symbols rather than points, the source table(s) must have an unrestricted
string type column named SYMBOLCODE
, which is the desired symbol's
identifier. All necessary symbols need to be added via the
/insert/symbol endpoint. The IDs in the SYMBOLCODE
column must
match up with the IDs of the inserted symbols.
Note
Labels and shapes cannot be rendered in the same WMS call. Both can be shown on the same map by creating separate map layers, each with its own WMS call.
For example, to generate a raster image from a table
nyc_neighborhood
with the
following characteristics:
EPSG:4326
-74.1
to -73.9
and latitude is from
40.6
to 40.9
1024
x 1024
geom
DOSHAPES
is set to TRUE
http://${HOSTNAME}:9191/wms?REQUEST=GetMap
&SRS=EPSG:4326
&LAYERS=nyc_neighborhood
&BBOX=-74.1,40.6,-73.9,40.9
&WIDTH=1024
&HEIGHT=1024
&STYLES=raster
&GEO_ATTR=geom
&DOSHAPES=TRUE
To generate a raster image from a table Flights
with the following
characteristics:
EPSG:4326
-180
to 180
and latitude is from
-90
to 90
512
by 512
006BBB
80858E
http://${HOSTNAME}:9191/wms?REQUEST=GetMap
&SRS=EPSG:4326
&LAYERS=flights
&BBOX=-180,-90,180,90
&WIDTH=512
&HEIGHT=512
&STYLES=raster
&DOTRACKS=1
&TRACKHEADSHAPES=diamond
&TRACKMARKERCOLORS=006BBB
&TRACKMARKERSHAPES=square
&TRACKLINECOLORS=80858E
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 tables
with styling applied on a per-class basis. Distinct values (for strings) or
ranges (for numeric columns) must be provided in the CB_VALS
parameter.
Important
All RASTER
mode parameters except SYMBOLROTATIONS
and
ORDER_LAYERS
can be used with the CB_RASTER
mode in
addition to the parameters listed below
Name | Description | Allowable Values | Default Value |
---|---|---|---|
CB_ATTR |
Class break attribute (Required) | Any column from the LAYERS source table list |
|
CB_VALS |
Values or ranges to apply for the class break (Required) NOTE: The starting value of the range is inclusive and the end value is exclusive |
List of values or ranges separated by
This specifies three ranges: 0 up to but not including 5
5 up to but not including 10
15 up to but not including 30
|
|
CB_DELIMITER |
A group of characters which separate
values or ranges in CB_VALS .
Default value is , |
Alpha-numeric or special characters | , |
ORDER_CLASSES |
Enables classes to be rendered in the order they were specified | TRUE or FALSE |
FALSE |
USE_POINT_RENDERER |
Set to NOTE: Only used when OpenGL rendering is disabled |
TRUE or FALSE |
FALSE |
CB_POINTCOLOR_ATTR |
Class break attribute applied to only the
point color. Overrides CB_ATTR
when applied |
Any column from the LAYERS source table list |
|
CB_POINTCOLOR_VALS |
Values or ranges to apply for the
NOTE: The starting value of the range is inclusive and the end value is exclusive |
List of values or ranges separated by
This specifies three ranges: 0 up to but not including 5
5 up to but not including 10
15 up to but not including 30
|
|
CB_POINTSIZE_ATTR |
Class break attribute applied to only the
point size. Overrides CB_ATTR
when applied |
Any column from the LAYERS source table list |
|
CB_POINTSIZE_VALS |
Values or ranges to apply for the
NOTE: The starting value of the range is inclusive and the end value is exclusive |
List of values or ranges separated by
This specifies three ranges: 0 up to but not including 5
5 up to but not including 10
15 up to but not including 30
|
|
CB_POINTSHAPE_ATTR |
Class break attribute applied to only the
point shape. Overrides CB_ATTR
when applied |
Any column from the LAYERS source table list |
|
CB_POINTSHAPE_VALS |
Values or ranges to apply for the
NOTE: The starting value of the range is inclusive and the end value is exclusive |
List of values or ranges separated by
This specifies three ranges: 0 up to but not including 5
5 up to but not including 10
15 up to but not including 30
|
All of the RASTER
-mode styling parameters are valid for CB_RASTER
(except SYMBOLROTATIONS
); however, there must be styling parameters
specified for each class. Each entry in CB_VALS
connotes an individual
class to which styling is applied. If styling parameters are not provided for a
class, the default value is applied.
The per-style class break parameters (CB_POINTCOLOR...
, CB_POINTSIZE...
,
and CB_POINTSHAPE...
) can be used to override attribute color, size, or
shapes if the given data falls into the given range, e.g., enlarge a point's
size if its total sales amount was greater than some amount.
The keyword <other>
can be used as a value in CB_VALS
instead of a
class name to render all non-matching classes as specified by corresponding
style options. The length of the style options must match the number of classes
specified (including <other>
).
For example, to generate a category-based class-break raster image from a table
nyctaxi
with the following characteristics:
PLATE_CARREE
-74.1
to -73.9
and latitude is from
40.6
to 40.9
1024
x 1024
nyctaxi
table's pickup_longitude
columnnyctaxi
table's pickup_latitude
columnnyctaxi
table's passenger_count
columndiamonds
colored yellow (999900
)circles
colored orange (CC6600
)<other>
keyword) -- squares
colored red (FF0000
)ORDER_CLASSES
is enabled, so 999900
will be rendered first, CC6600
will be rendered below that, and FF0000
below that2
http://${HOSTNAME}:9191/wms?REQUEST=GetMap
&SRS=PLATE_CARREE
&LAYERS=nyctaxi
&BBOX=-74.1,40.6,-73.9,40.9
&WIDTH=1024
&HEIGHT=1024
&STYLES=cb_raster
&X_ATTR=pickup_longitude
&Y_ATTR=pickup_latitude
&CB_ATTR=passenger_count
&CB_VALS=1:3,3:5,<other>
&POINTCOLORS=999900,CC6600,FF0000
&ORDER_CLASSES=true
&POINTSIZES=2
&POINTSHAPES=diamond,circle,square
The heatmap mode is used to generate a heat map image of one or more tables. Heatmaps are a visual representation of the information contained in the given tables.
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 |
GRADIENT_START_COLOR |
Gradient start color for the heat map | Hex color | 000000 (black) |
GRADIENT_END_COLOR |
Gradient end color for the heat map | Hex color | 000000 (black) |
VAL_ATTR |
Attribute to use to calculate the data points for the heat map | Column from LAYERS source table list; must be of int,
double, float, long, or decimal
column type. Can invoke several
"behaviors"; See below for more information. |
(none) |
For the Heatmap mode in particular, the BBOX
parameter defines the
geographic area while the WIDTH
and HEIGHT
parameters define the pixel
grid resolution over which the heatmap will be calculated.
If COLORMAP
is specified, it will be used regardless of whether
GRADIENT_START_COLOR
/GRADIENT_END_COLOR
are specified. If the given
colormap is invalid, an error will be returned. If COLORMAP
is blank
or unspecified, GRADIENT_START_COLOR
/GRADIENT_END_COLOR
are used, if
specified. If none of these is specified, the jet
colormap will be used.
VAL_ATTR
can be used to enable special behaviors. A description of the
behavior as well as how to enable the behavior can be found below.
VAL_ATTR
is specified or VAL_ATTR=
VAL_ATTR=count(column_name)
VAL_ATTR=column_name
VAL_ATTR=sum(column_name)
VAL_ATTR=avg(column_name)
VAL_ATTR=mean(column_name)
VAL_ATTR=min(column_name)
VAL_ATTR=max(column_name)
For example, to generate a heatmap image from a table nyctaxi
with the
following characteristics:
PLATE_CARREE
-80
to -70
and latitude is from
35
to 45
512
x 512
nyctaxi
table's pickup_longitude
columnnyctaxi
table's pickup_latitude
column5
http://${HOSTNAME}:9191/wms?REQUEST=GetMap
&SRS=PLATE_CARREE
&LAYERS=nyctaxi
&BBOX=-80,35,-70,45
&WIDTH=512
&HEIGHT=512
&STYLES=heatmap
&BLUR_RADIUS=5
&X_ATTR=pickup_longitude
&Y_ATTR=pickup_latitude
&COLORMAP=plasma
The contour mode is used to generate a contour plot image of one or more
tables. A contour plot is a plane section of the three-dimensional graph of the
function z = f(x, y)
parallel to the x, y
plane. Contour plots contain
isolines, which show the location(s) where the data has the same z
value.
Available parameters are:
Name | Description | Allowable Values | Default Value |
---|---|---|---|
COLORMAP |
Colormap for the contour or contour grid. |
|
jet |
COLOR |
Isoline color to be used when flooded contours are enabled; otherwise isolines will follow the colormap | Hex notation in the format RRGGBB or AARRGGBB , in
which case the alpha value is used for the transparency
of the flooded contours. The line itself is always opaque. |
''FF000000'' |
BG_COLOR |
Background color | Hex notation in the format RRGGBB or AARRGGBB
(to specify the alpha value) |
''00000000'' (transparent) |
TEXT_COLOR |
Color of labels text | Hex notation in the format RRGGBB or AARRGGBB
(to specify the alpha value) |
''FF000000'' |
MIN_LEVEL |
Minimum isoline value to be shown. | Number | -1 |
MAX_LEVEL |
Maximum isoline value to be shown. | Number | -1 |
NUM_LEVELS |
Number of equally-separated isolines to be shown. | 10 or greater |
10 |
ADJUST_LEVEL |
Recompute the minimum and maximum levels based on the current
data in the viewport. Setting this will ignore the values
of MIN_LEVEL and MAX_LEVEL . |
Number | 1 |
VAL_ATTR |
Attribute to use to calculate the isolines. | Column from LAYERS source table list; must be of int,
double, float, long, or decimal
column type. Can invoke several
"behaviors"; See below for more information. |
z |
SEARCH_RADIUS |
Neighborhood of influence of sample data (in percent of the image/grid). See below for more information. | Number | 1 |
GRIDDING_METHOD |
Methods to produce a regularly-spaced, rectangular array of values from potentially irregularly-spaced XY-val data. See below for more information. |
|
INV_DST_POW |
SMOOTHING_FACTOR |
Amount of smoothing of the contribution of neighboring points. | Number between 0 and 1 |
0.01 |
MAX_SEARCH_CELLS |
Maximum number of cells to use once the SEARCH_RADIUS has
been converted from percentage to cells. The higher the
number, the higher the quality of the contour plot. |
Number | 100 |
RENDER_OUTPUT_GRID |
Show the grid used to build the contour plot, which is equivalent to generating a flooded-contour. This affects the labels by clipping the area around them. The opacity of the flooded-contours is specified in ''COLOR''. | 0 (false) or 1 (true) |
0 |
GRID_SIZE |
Number of subdivisions along the x axis when building the grid. The y axis will be set according to the aspect ratio. | Number | 100 |
ADJUST_GRID |
Allows the grid size and search radius to be automatically varied based on the current data in the viewport. | 0 (false) or 1 (true) |
0 |
ADJUST_GRID_NEIGH |
Used to estimate the clustering of the data (k-means) when
ADJUST_GRID is set to 1 . Clustering estimation is
capped by MAX_SEARCH_CELLS . |
Number between 0 and 1 |
1 |
ADJUST_GRID_SIZE |
Size of the sampling grid used to compute the fill and
clustering ratios when ADJUST_GRID is set to 1 . |
Number | 20 |
MIN_GRID_SIZE |
Lower limit (in cells) of the grid size when
ADJUST_GRID is set to 1 |
Number | 10 |
MAX_GRID_SIZE |
Upper limit (in cells) of the grid size when
ADJUST_GRID is set to 1 |
Number | 500 |
ADD_LABELS |
Add label contour lines with the value of their level. | 0 (false) or 1 (true) |
0 |
LABELS_FONT_SIZE |
Size of the font to use for labels. | Number between 4 and 48 |
12 |
LABELS_FONT_FAMILY |
Name of the font to use for labels. The font must be on the system. | Any font codes available on all database servers | Sans |
LABELS_SEARCH_WINDOW |
When ADD_LABELS is set to 1 , a search window is used
to rate the local quality of each isoline. Smooth, continuous,
long stretches with relatively flat angles are favored.
This setting is multiplied by the font size to set the
final window size. |
Number between 1 and 8 |
4 |
LABELS_INTRALEVEL_SEPARATION |
When ADD_LABELS is set to 1 , labels are automatically
separated to avoid overlap. This setting specifies the
distance to use when separating labels of different values
(in multiples of the font size). |
Number between 1 and 8 |
4 |
LABELS_INTERLEVEL_SEPARATION |
When ADD_LABELS is set to 1 , more than one label can
placed on the same isoline. This setting specifies the
distance to use when separating labels of the same value
(in percent of the total window size). |
Number between 0 and 50 |
25 |
LABELS_MAX_ANGLE |
Maximum angle , in degrees, from the vertical to use when displaying labels. | Number between 0 and 90 |
60 |
To be able to construct a contour plot, we first need to grid the data in
a regularly-spaced XY array. This is achieved using the GRIDDING_METHOD
parameter, which is the most influential parameter of the contour plot. The
GRIDDING_METHOD
determines how the data is interpolated/extrapolated
and will also impact the speed at which the plot can be generated. The only
method supported at this time is INV_DST_POW
(Inverse Distance to a Power).
The SEARCH_RADIUS
heavily influences both the quality and speed of the
contour plot. It is method dependent and should be adjusted based on the
quantity and quality of the input data.
Once the grid is obtained, a marching squares algorithm is used to obtain
the isolines. The grid can be visualized by setting RENDER_OUTPUT_GRID
to 1
(true).
Additionally, we can set ADJUST_GRID
to 1
(true) if the density of the
data in the current viewport is so low that the resulting grid is not filled
properly when using the user-specified grid size and search radius. This
option will automatically adapt the grid size and/or search radius to get a
better interpolation of the data by first running a coarse gridding pass, then
collecting data about density and sparsity, and finally choosing the latter
value accordingly before re-running the contour lines generation.
Finally, labels can be added to the isolines by setting ADD_LABELS
to 1
.
Label font size, font family, angle, and separation are the main parameters
to control how the labels are displayed.
For example, to generate a contour plot image from a table with the following characteristics:
Note
The contour plot image for this example is generated from an aggregate
groupby result table contour_source
. This result table aggregates dropoff
points and counts of points from the nyctaxi
table.
curl -sS -X POST --header "Content-Type: application/json" \
--data '{"table_name":"nyctaxi", "column_names":["dropoff_longitude","dropoff_latitude","float(count(*)) as dropoff_point_count"], "offset":0, "limit":-9999, "encoding":"json", "options":{"result_table":"contour_source"}}' \
http://${HOSTNAME}:9191/aggregate/groupby
SRS is PLATE_CARREE
Bounding box longitude is from -74.1
to -73.9
and latitude is from
40.6
to 40.9
Image size is 512
x 512
X-axis position is extracted from the contour_source
table's
dropoff_longitude
column
Y-axis position is extracted from the contour_source
table's
dropoff_latitude
column
Number of individually-separated isolines is set to 150
Number of isolines is automatically adjusted based on the viewport
Z value for the contour plot isolines is extracted from the contour_source
table's dropoff_point_count
column
Search radius for the isolines is 15% of the grid
Grid size is manually set to 50
Labels are added; labels of different values are separated by a space worth
5
times the font size (default font size is 12
)
http://${HOSTNAME}:9191/wms?REQUEST=GetMap
&SRS=PLATE_CARREE
&LAYERS=contour_source
&BBOX=-74.1,40.6,-73.9,40.9
&WIDTH=512
&HEIGHT=512
&STYLES=contour
&FORMAT=image/png
&X_ATTR=dropoff_longitude
&Y_ATTR=dropoff_latitude
&COLORMAP=jet
&NUM_LEVELS=150
&ADJUST_LEVEL=1
&VAL_ATTR=dropoff_point_count
&SEARCH_RADIUS=15
&GRIDDING_METHOD=INV_DST_POW
&GRID_SIZE=50
&ADD_LABELS=1
&LABELS_INTRALEVEL_SEPARATION=5
"
The labels mode is used to show labels on the map rather than points. Available parameters are:
Name | Description | Allowable Values | Default Value |
---|---|---|---|
LABEL_LAYER |
name of table to render (Required) | ||
LABEL_X_ATTR |
name of column containing label's position on the x-axis | Numeric column from LABEL_LAYER source table
list; must be of int, double, float, or long
column type |
Column x |
LABEL_Y_ATTR |
name of column containing label's position on the y-axis | Numeric column from LABEL_LAYER source table
list; must be of int, double, float, or long
column type |
Column y |
LABEL_TEXT_STRING |
text of label to render | All printable characters | no text |
LABEL_FONT |
font in the format of Name Style(s) Size
(e.g. Arial Bold 8 ) |
Any font codes available on all database servers | default server font |
LABEL_TEXT_COLOR |
text color | Hex color (with or without alpha values) or
-1 (full transparency) |
FF000000 |
LABEL_TEXT_SCALE |
text scaling factor | Number | 1 |
LABEL_TEXT_ANGLE |
number of degrees clockwise to rotate the label | Number | 0 |
LABEL_DRAW_BOX |
draw a box around the label | 0 (false) or 1 (true) |
0 |
LABEL_DRAW_LEADER |
draw a leader line from each label to its x,y point specified
by LABEL_LEADER_X_ATTR & LABEL_LEADER_Y_ATTR columns |
0 (false) or 1 (true) |
0 |
LABEL_LINE_WIDTH |
width of line for box & leader line | Number | 1 |
LABEL_LINE_COLOR |
color of line for box & leader line | Hex color (with or without alpha values) or
-1 (full transparency) |
FF000000 |
LABEL_FILL_COLOR |
color of fill for box | Hex color (with or without alpha values) or
-1 (full transparency) |
FF000000 |
LABEL_LEADER_X_ATTR |
name of column containing leader line's terminating position on the x-axis (the end opposite the label) | Numeric column from LABEL_LAYER source table
list; must be of int, double, float, or long
column type |
N/A |
LABEL_LEADER_Y_ATTR |
name of column containing leader line's terminating position on the y-axis (the end opposite the label) | Numeric column from LABEL_LAYER source table
list; must be of int, double, float, or long
column type |
N/A |
LABEL_FILTER |
boolean expression used to filter which labels are included
from LABEL_LAYER |
N/A | |
LABEL_X_OFFSET |
horizontally offset the label rendering from the actual coordinate using the given value | Number | N/A |
LABEL_Y_OFFSET |
vertically offset the label rendering from the actual coordinate using the given value | Number | N/A |
Important
When using the labels mode, LABEL_LAYER
is required.
All LABELS
parameters can use expressions. To read more about the different
types of expressions, see expressions.
Strings inside expressions must be enclosed in single or double quotes.
Expressions inside the LABEL_TEXT_COLOR
, LABEL_LINE_COLOR
, and
LABEL_FILL_COLOR
parameters must resolve to 6 or 8 hex digits or the color
won't work. Note that if the expression resolves to 6 hex digits, an alpha
value of FF
is automatically added.
To use labels, the requested TrueType fonts must be loaded on all servers in
the Kinetica cluster, in the /usr/share/fonts
directory. Kinetica
must be restarted to see any new fonts placed in this directory.
Labels and shapes cannot be rendered in the same WMS call. Both can be shown
on the same map by creating separate map layers, each with its own WMS call.
When making the WMS call for the labels to be generated, the LAYERS
parameter (geospatial source table containing the shapes) can be left blank.
LABEL_DRAW_BOX
and LABEL_DRAW_LEADER
will only take values that
are castable to boolean values (e.g., 1
and 0
). "TRUE" and "FALSE"
are not valid.
All colors must be provided in hex notation in the format RRGGBB
or
AARRGGBB
(to specify the alpha value). For example, partially transparent
red may be given as B3FF0000
.
Parameters other than the following can be either literals of the appropriate parameter type or column names containing values of the appropriate type:
LABEL_LAYER
LABEL_X_ATTR
LABEL_Y_ATTR
LABEL_LEADER_X_ATTR
LABEL_LEADER_Y_ATTR
For example, to generate a label image overlay from a table nyctaxi
with the
following characteristics:
SRS is EPSG:4326
Bounding box longitude is from -74.1
to -73.9
and latitude is from
40.6
to 40.9
Image size is 512
x 512
X-axis position is extracted from the nyctaxi
table's
dropoff_longitude
column
Y-axis position is extracted from the nyctaxi
table's dropoff_latitude
column
Label text is dropoff
, is white (FFFFFF
), scaled to 40% smaller
(0.6
x) than normal, rotated 15
degrees clockwise
A blue-filled (B3006BBB
) box is drawn around each label
Labels are only drawn for dropoff points where the passenger count was greater than 5
http://${HOSTNAME}:9191/wms?REQUEST=GetMap
&SRS=EPSG:4326
&BBOX=-74.1,40.6,-73.9,40.9
&WIDTH=512
&HEIGHT=512
&STYLES=labels
&LABEL_LAYER=nyctaxi
&LABEL_X_ATTR=dropoff_longitude
&LABEL_Y_ATTR=dropoff_latitude
&LABEL_TEXT_STRING='dropoff'
&LABEL_TEXT_SCALE=0.6
&LABEL_TEXT_ANGLE=15
&LABEL_DRAW_BOX=1
&LABEL_FILL_COLOR=B3006BBB
&LABEL_FILTER=passenger_count>5
&LABEL_TEXT_COLOR=FFFFFF
"