Geovisualization Developer's Guide

Georeference

The georeference request body is a JSON object sent in the body in a Geovisualization REST API request to specify the lat-lon columns in the dataset to use as the reference to translate to geographical locations. Note that you can run only one georeferencing job per dataset at a time.

Table 1. Georeference Request Elements
Element Data Type Mandatory Description
lat_column String Yes Name of the latitude column where latitude values are found in the dataset, for example "lat"
layer_name String Yes Name of the geographical layer referenced to resolve the lat-lon values. The layer must have the georeference functionality enabled, that is, the property capabilities=['georeference'].
lon_column String Yes Name of the longitude column where longitude values are found in the dataset, for example "lon"
columns_to_extract Array Yes A comma-separated list of the column names to extract from the layer
geom_column String No Name of the geometry column in the layer
predicate String Yes Indicates the spatial relational predicate to be performed on the reference. The value can be one of the following:
  • within: returns the object from the layer that spatially "envelopes" the location (lat,lon)
  • withind: as for within but with a threshold distance (in map units) applied. Values should be greater than 0.0.
  • nearestd: returns the nearest (as the crow flies) object within the specified threshold distance (in map units). Defaults to 0.0.
overwrite Boolean Yes Specifies whether or not to overwrite any existing result values from the georeferencing job

The code example below shows the data structure sent in a request to create a georeference job.

{
  "layer_name": "{LAYER_NAME}",
  "columns_to_extract": "column_a,column_b,...",
  "geom_column": "geom",
  "lat_column": "location.lat",
  "lon_column": "location.lon",
  "predicate": "nearestd",
  "overwrite": false
}