Geovisualization Developer's Guide

Reproject Dataset

The projections request body is a JSON object sent in the body of a Geovisualization REST API request to reproject the coordinates of a dataset.

The projection specification consists of a namespace (ns attribute) and a projection specification (spec). Valid values for ns are: epsg, epsga, wkt, and xml. The value of spec depends on the namespace, but it must be a number.

Table 1. Reproject Dataset Request Elements
Element Data Type Mandatory Description
source_columns Array Yes A list of names of columns containing the coordinates to be reprojected
destination_columns Array Yes A list of names of columns to store the reprojection results
source_projection Object Yes The namepace and source of the specification for the reprojection
target_projection Object Yes The namepace and target of the specification for the reprojection

The code example below shows a typical request object.

{
"source_columns": ["x-col", "y-col"],
"destination_columns": ["new-x-col", "new-y-col"],
"source_projection": {"ns": "epsg", "spec": 2001},
"target_projection": {"ns": "xml", "spec": 1.0}
}