Setting Up New Geocoding Tables


TIBCO Spotfire comes with a selection of geocoding hierarchies that are normally stored in the library. You can also define your own geocoding tables using shapefiles (.shp) or data tables and save them in the library for future use. This is accomplished by setting a few data table and column properties on the geocoding table in TIBCO Spotfire and then exporting the file to the library.

To set 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 Analyst.

  2. Select Data > Column properties and go to the Properties tab, to specify the necessary column properties for the identifying columns.

  3. Click on each geographic column that will be used to geocode data and specify the applicable properties (note that there may be several different columns in your data table that need to have one or more of these properties specified. For example, if you have a Geometry column, an X column and a Y column, all of those will need different values on the mapchart.columntypeid property, as indicated below):

    GeocodingType is used to specify the type of geocoding identifiers in the column (such as Country, State or City).

    GeocodingRepresentation is used to specify the representation of the geocoding identifiers. It can be a language code (such as en-us, US-English) or a standard identifier, such as ISO3166-2:us, or some other ISO standard code.

    GeocodingHierarchyName is used to group geocoding columns that belong in the same hierarchy.

    If the data originates from an ESRI shapefile, the coordinates and geometry columns will automatically be tagged correctly, otherwise you must add the following column properties, as specified in Configuration of Geographical Data for Map Charts:
    A longitude column should have the property mapchart.columntypeid with the value XCenter.
    A latitude column should have property
    mapchart.columntypeid with the value YCenter.
    A geometry column should have property
    mapchart.columntypeid with the value Geometry.
    A geometry column should also have the property ContentType with the value application/x-wkb.

    These property values are what will be matched with the same property values of the data that should be geocoded later, so choose wisely.

  4. Select Data > Data table properties and go to the Properties tab and add the following data table properties:

    MapChart.IsGeocodingTable is used to determine whether a saved SBDF file should be interpreted as a geocoding table or not. The data type for this property must be set to Boolean. Set the value for this property to True. The export will then pick up that it is a geocoding table and automatically transfer the properties to library properties.

    MapChart.GeocodingHierarchyName is used to group geocoding tables that belong in the same hierarchy. The data type is normally a String. Values are, for example, "USA 2013", "Belgium", etc.

    MapChart.GeocodingAutoload is used to indicate whether or not the geocoding table should be allowed to be automatically downloaded to the analysis when Spotfire finds out that it can be used as a geocoding table for the current data table. This value can be used to prevent large geocoding tables from being automatically downloaded. The data type must be set to Boolean. The value must be either True or False.

    MapChart.IsGeocodingEnabled is used to indicate whether the geocoding table is currently enabled.  The data type must be set to Boolean. The value must be either True or False. This property is important when geocoding tables are saved in the library. See also Details on Edit Properties – Geocoding.

    MapChart.GeometryType is used to define the type of feature when the geocoding table contains a Geometry (shape) column. The data type must be set to String. The values can be either Point, Line or Polygon.

    There are also a number of additional properties that you can specify for geocoding tables. These properties are not mandatory:

    MapChart.GeocodingHierarchyPriority is used 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 data type must be set to Integer, and the Default Value must be between 0 and 100 (100 being the highest priority).

    MapChart.GeocodingHierarchyVersion is used to specify the version of the geocoding hierarchy in the form of a date (YYYYMMDD).

    MapChart.GeographicCrs is used to specify the coordinate reference system describing the data (e.g. “EPSG:4326” for WGS 84).

  5. Export the table to the library as SBDF using File > Export > Data to library.

    Response: 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.

  6. Restart Spotfire for changes to take effect.

See also:

What is Geocoding?

Column Properties – Geocoding

Column Properties Descriptions

Details on Edit Properties – Geocoding