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
Positioning features (shapes, lines or points) on the map
Use the Geocoding (in the installed client visualization properties dialog) or Geographic location (in the web client properties popover) property settings if you must make changes to the automatic attempt to place geographical elements on the map.
Under Feature by (geocoding) you can select the column or hierarchy representing the feature you want to show. For example, a country and/or a state column. The features for the geographical names are automatically positioned (by means of the geocoding tables) on the their geographical coordinates on the map. For more information on geocoding, see Geographic location and geocoding.
When working in the installed client, the Feature Layer Settings dialog provides the option to use Auto-match, if the first automatic geocoding fails. With this functionality, Spotfire makes an attempt to classify the content of the columns selected on the axis (Feature by), in search for geographic information. If any of the columns are successfully classified, then an automatic geocoding is performed which downloads geocoding tables and sets up the column matches.
If you add geocoding tables manually, you might need to edit column matches as well.
Turning off geometry simplification
Under Turn off simplification for features with less points than in the Appearance settings, you can specify the number of points below which geometry simplification will not be used when rendering features.
Geometry simplification facilitates the rendering of features with a large number of points by snapping the points to even pixels. If two adjacent points fall within the same pixel, one is omitted.
For rectangle features that are typically represented by 5 points (the fifth point is the same as the first point), the simplification might cause rendering inconsistencies. If you encounter these issues, try setting Turn off simplification for features with less points than to 6 to deactivate the simplification when rendering the rectangles.
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 (showing 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.
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.

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 and Specifying new geocoding tables.
- 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-wkbfor the Geometry column. - The data type of the geometry column should be "Binary" or "BLOB".
- The data types for the coordinate columns (XMin, XMax, YMin, YMax, XCenter, YCenter) should be "Real".
- The renderer for the
geometry column should be set to
Geometry in the visualization properties of
the selected visualization. For example, in the Columns section 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.