Points in Polygons Data Function for TIBCO Spotfire®

Geospatial data can come in several forms, for example locations of specific points, or polygons that define areas of interest.  When both point and polygon data are present, it is often useful to identify the enclosing polygon for each point, so information from both tables can be merged

Compatible Products

TIBCO Spotfire®

Provider

TIBCO Software

Supported Versions

Programming Language: TERR V4.2

License

TIBCO Component Exchange License

Overview

For each point in a table of locations defined by Latitude and Longitude coordinates, identify its corresponding enclosing polygon contained in a separate table. Returns a column that contains the enclosing polygon identifier to append to the point location table.

Learn more about using Data Functions

License Details

Release(s)

Spotfire Platform Release v1.0

Published: October 2016

Initial Release

Spotfire Cloud Release v1.0

Review (1)
5
Neil Kanungo 1:15pm 08/06/2018

This Data Function works great and is such a useful feature! This can be used to categorize any points on my maps that fall within regions so I don't have to manually update my data!

Points in Polygons Data Function for TIBCO Spotfire - Wiki page

TERR Points in Polygons Data Function 

Geospatial data can come in several forms, for example locations of specific points, or polygons that define areas of interest.   
When both point and polygon data are present, it is often useful to identify the enclosing polygon for each point, so information from both tables can be merged.

This TERR data function, "Points in Polygons", performs this identification; this data function is useful if you have a shapefile containing polygons, and a separate table containing Latitude-Longitude coordinates of points.

Programming Language: TERR V4.2
Required R Packages: sp, wkb

Description: For each point in a table of locations defined by Latitude and Longitude coordinates, calculate which is its corresponding enclosing polygon from a separate table. Returns a column that contains the enclosing polygon identifier to append to the point location table.

Inputs:
Geometry (Geometry column from shapefile table)
ID (Identifier column from shapefile table)
Longitude (Longitude column from point table)
Latitude (Latitude column from point table)

Output:
Id (column to append to the point table)

This dxp file illustrates this process using two tables:

  • Point locations of some US airports
  • State shapefiles
Example Input Table #1: Polygons: Shape file with outlines of US States;
Example Input Table #2:  Point data: Geographic locations of some US Airports:

Example Output:  After running the TERR "Points in Polygons" data function, a new column named "Id" containing the state name identifier from the Shapefile is now present in the Airport Location table:

Data Sources

State Shapefile from US Census, "Cartographic Boundary Shapefiles - States"
https://www.census.gov/geo/maps-data/data/cbf/cbf_state.html

Airport data from FAA, Federal Aviation Adminstration,
http://www.faa.gov./airports/airport_safety/airportdata_5010

 

View the Wiki Page