Expanding Spotfire geocoding coverage

Last updated:
3:17am Jul 06, 2016

 

TIBCO Spotfire comes with a selection of geocoding hierarchies stored in the library but you can also define your own geocoding tables using shape files (.shp) or data tables and save them in the library for future use.

Looking for geographic data sources? Click here.

Setting up a new geocoding table in the library

1. Load the data containing the coordinates and/or geometries along with the identifying columns (such as state name or state code) in TIBCO Spotfire.

2. If the data originates from an ESRI shape file, the coordinates and geometry columns will automatically be tagged correctly, otherwise you must add the following column properties:

  • The longitude column should have property mapchart.columntypeid = XCenter.
  • The latitude column should have property mapchart.columntypeid = YCenter.
  • The geometry column should have property mapchart.columntypeid = Geometry.
  • The geometry column should also have the property ContentType = application/x-wkb

3. There are a number of data table properties that are required for geocoding tables.

Go to Edit > Data Tables Properties > Properties tab and add the following properties:

  • MapChart.IsGeocodingTable to determines if a saved SBDF file should be interpreted as a geocoding table or not. It is either True or False. The datatype must be set to Boolean.
  • MapChart.GeocodingHierarchyName to group geocoding tables that belong in the same hierarchy. For example, "Belgium".
  • MapChart.GeocodingAutoload to indicate whether or not the geocoding table should automatically downloaded to the analysis when Spotfire finds out that it can be used as a geocoding table for the current data table. This property is either True or False. The datatype must be set to Boolean.
  • MapChart.IsGeocodingEnabled to indicate if the geocoding table is currently enabled.  It is either True or False. The datatype must be set to Boolean. This property is important when geocoding tables are saved in the library.
  • MapChart.GeometryType property is used to define the type of feature when the geocoding table contains a Geometry (shape) column. It can be either Point, Line or Polygon.

There are a number of additional properties you can apply for geocoding tables. These properties are not mandatory.

  • MapChart.GeocodingHierarchyPriority to control the priority of the hierarchy in which the table is included. A geocoding hierarchy with higher priority will be selected first if two hierarchies result in an equal number of column matches when automatic geocoding is applied. This property datatype must be set to Integer, and the Default Value must be between 0 and 100 (100 being the highest priority).
  • MapChart.GeocodingHierarchyVersion to specify the version of the geocoding hierarchy in the form of a date (YYYYMMDD).
  • MapChart.GeographicCrs to set the coordinate reference system describing the data (e.g. “EPSG:4326” for WGS 84).

4. There are also a number of column properties that should be set on the columns in a geocoding table.

Go to Edit > Columns Properties, select the geographic column that will be used to geocode data and fill the following properties:

  • GeocodingType property to specify the type of geocoding identifiers in the column (such as Country or State)
  • GeocodingRepresentation property specifies the representation of the geocoding identifiers (such as US-English or some ISO standard code)
  • GeocodingHierarchyName to group geocoding columns that belong in the same hierarchy.
  • mapchart.columntypeid to specifu the type of a map chart column in a Shape file. For example, Geometry, XCenter or YCenter

5. Export the table to the library using File > Export > Data to Library...

6. The data table is saved as a file in the library and will be available in all places where a geocoding hierarchy can be selected. Restart Spotfire for change(s) to take effect.

Feedback (1)

Where are the default shapefiles stored?

ODO 7:14am Oct. 23, 2018