Show Menu
TOPICS×

Define element point layers referencing lookup files

When creating an element point layer that references a lookup file to obtain latitude and longitude data, the location of the point is obtained by retrieving each element and its associated latitude and longitude from the lookup file.
Instead of using a lookup file, you can use the Dynamic Points functionality, which embeds the latitude and longitude of a location in the name of each element of a dimension. See Defining Element Point Layers Using Dynamic Points .
To define an element point layer that references a lookup file, you must create or already have available the following:
  • A dimension defined in the Transformation.cfg file or a transformation dataset include file. For information about transformation configuration files, see the Dataset Configuration Guide .
  • A lookup file containing the data used to plot each data point. This file must contain at least three columns of data for each data point: the key, the longitude, and the latitude. For more information about the required format of the lookup file, see Element Point Layer File Format .
  • A layer file that specifies the location of the lookup file and identifies the related dimension and metric as well as the key, longitude, and latitude column names in the lookup file. For more information about the required format of the layer file, see Element Point Layer File Format .
    The Zip Points.layer file, provided with the Geography profile, is an element point layer that identifies the Zipcode.dim file, the Sessions.metric file, the Zip Points.txt lookup file, and the names of the key, longitude, latitude, and name columns in the lookup file.

Element point lookup file format

The element point layer lookup file must contain at least the following three columns:
  • Key column: This column should contain common key data, which enables the Data Workbench server to connect the data in the lookup file to that in the dataset. The key column must be the first column in the lookup file. Each row in this column identifies an element of the dimension.
  • Longitude column: This column should contain the longitude for each data point in the Key column.
  • Latitude column: This column should contain the latitude for each data point in the Key column.
  • Name column (Optional): If you want to specify a name to be displayed on the map for each data point, you can include a Name column in the lookup file.
Each row in the Zip Points.txt lookup file contains a ZIP Code in the first column followed by the longitude, latitude, and associated city name.
tude, and associated city name.
ZIP_CODE LATITUDE LONGITUDE NAME
00210 +43.005895 -071.013202 PORTSMOUTH, NH
00211 +43.005895 -071.013202 PORTSMOUTH, NH
...

Element point layer file format

Each element point layer .layer file that references a lookup file must be formatted using the following template:
Layer = ElementPointLayer:
  Data Paths = vector: 1 items
    0 = Path: Maps\\Lookup File Name.txt
  Longitude Column = string: Longitude Column Name
  Latitude Column = string: Latitude Column Name
  Name Column = string: Location Column Name
  Key Column = string: Key Column Name
  Dimension = ref: wdata/model/dim/Dimension Name
  Metric = ref: wdata/model/metric/Metric Name
  Scale = double: Scale
  Color = v3d: RGB Color Vector
  Rendering Mode = int: Mode Number

Parameter Description
Data Paths Path to the lookup file containing latitude and longitude data.
Longitude Column The name of the column in the lookup file containing the longitude data.
Latitude Column The name of the column in the lookup file containing the latitude data.
Name Column Optional. The name of the column in the lookup file containing the names of the locations represented by the latitude and longitude data.
Key Column
The name of the column in the lookup file containing the common key data, which enables the Data Workbench server to integrate the data in the lookup file into the dataset. This must be the first column in the lookup file.
Each row in this column is an element of a dimension. This dimension must be defined in the Transformation.cfg file or a transformation dataset include file and specified in the Dimension parameter of this file. For more information about transformation configuration files, see the Dataset Configuration Guide .
Dimension The name of the dimension (defined in a transformation configuration file) containing elements that correspond to the data rows in the Key column.
Metric The name of the metric that is evaluated over the dimension specified in the Dimension parameter.
Scale Optional. Value used to size the points in the layer. The default value is 100. Larger values make the points bigger, and smaller values make them smaller.
Color Optional. The RGB color vector, which is expressed as (red,green,blue). For each color in the vector, you can enter a value from 0.0 to 1.0. For example, (1.0, 0.0, 0.0) is bright red, and (0.5, 0.5, 0.5) is gray.
Rendering Mode
Optional. Integer value representing the rendering mode to use for the layer. The three available modes are as follows:
  • Rendering Mode 1. Points size is defined in screen space (points stay a constant size relative to the computer screen). Points are rendered using polygons, so there is no upper limit on point size. This is the default rendering mode.
  • Rendering Mode 2. Point size is defined in world space (points stay a constant size relative to the globe). Points are rendered using polygons, so there is no upper limit on point size.
  • Rendering Mode 3. Point size is defined in screen space. Points are rendered using OpenGL smooth points.
The Zip Points.layer file is formatted as follows:
Layer = ElementPointLayer:
  Data Paths = vector: 1 items
    0 = Path: Maps\\Zip Points.txt
  Longitude Column = string: LONGITUDE
  Latitude Column = string: LATITUDE
  Name Column = string: NAME
  Key Column = string: ZIP_CODE
  Dimension = ref: wdata/model/dim/Zipcode
  Metric = ref: wdata/model/metric/Sessions