TIBCO Cloud™ Spotfire® Web Client User Guide

Adding a feature layer

Features display areas or objects on a map. The features are usually administrative areas that are placed on the map based on the geographic information provided in your data and they can represent things like zip codes, cities, counties, regions, or countries. When shapefiles or GeoJSON files are opened in Spotfire they are automatically configured so that they can be used as feature layers in map charts. However, there may be times when some manual work is needed before the data can be used in a feature layer.

Procedure

  1. Right-click the map chart visualization, and from the menu, click Properties.
    The Properties popover is displayed, with the Map chart popover showing the current layers, in their layer order, top to bottom.
  2. Click Add new layer at the bottom of the Map chart list.
    A list of the layer options is displayed.
  3. From the list, click Feature layer and select the data table to draw the features from; either one of your own data tables at the top of the menu, or one of the available geocoding tables.
    For more information on geocoding, see Geographic location and geocoding.
    The feature layer is added to the Map chart layer list, the Properties list for the layer is displayed, and the layer with its default settings is added to the map chart.
  4. Optional: Drag and drop the layer to a new position on the list.
  5. Review properties for the map chart to refine the display.
    Tip: You can reuse the settings of an already existing layer. Select Duplicate layer in the Properties popover to duplicate either the selected layer in the same map chart, or to add a copy of a layer from another map chart in the analysis. See Duplicating a layer for detailed instructions.

Feature layer example

This map chart visualization shows Sweden, using two data tables: Sweden Counties and Sweden county capitals. The data includes added census information from 2015, and it has a calculated column indicating cities with populations over 200,000. The map chart visualization includes a feature layer with the following properties.

  • Title is set to Sweden Counties (Län)
  • Appearance is set to semi-transparent (displaying the OpenStreetMap cycling map TMS layer beneath it).
  • Data is set to the data table Sweden county capitals - Swedish Counties (Län).
  • Geographic location is set to Feature by County (län).
  • The Legend check box is cleared.
  • Color is set to the following values.
    • Color by: Larger than 200000 (an added calculated column).
    • Color scheme: 2 colors.
    • Color items: True (over 200,000) and False (under 200,000), with color selections customized to blue and red.
    Labels is set to First(County (län)).

The result is that the counties with cities over 200,000 (Stockholm, Västra Götaland, and Skåne) are the first color, while all other counties are the second color.


Feature layer map

Tip: You can add your own features. For information about creating your own features, see the following articles. (These articles are in the Community site. It is free to use but requires log in credentials.)

Requirements and settings for feature data in Spotfire

This bullet list is a summary of what is needed to view interactive shapes in Spotfire. See also Configuring WKB data for use with maps.

  • The binary geometry data must be extracted to one Geometry column and six coordinate columns. The columns also need to be assigned the proper value on the MapChart.ColumnTypeId column property: Geometry, XMin, XMax, YMin, YMax, XCenter and YCenter.
  • The ContentType column property must be set to application/x-wkb for the Geometry column.
  • The data type of the geometry column should be "Binary" or "BLOB".
  • The data types for the coordinate columns should be "Real".
  • The renderer for the geometry column should be set to Geometry in the Visualization Properties of the selected visualization (available in the installed client only). For example, in the Columns tab of a Table visualization.

    You can also show geometries as shapes in some labels and tooltips, and might also need to specify the Geometry renderer there.