Raster query
The Raster Query API allows users to request information related to a point location from one or more Koordinates grid or raster datasets.
URL
Your URL endpoint is dependent on the particular Koordinates service you wish to access.
The URL for the Koordinates.com will be: https://koordinates.com/services/query/v1/raster
The raster query API returns in JSON:
content-type: application/vnd.koordinates.rasterQuery+json
Formats can be specified via URL. For example: https://koordinates.com/services/query/v1/raster.json
They can also be specified using the HTTP Accept header with the appropriate content-type against the base URL. For example: application/vnd.koordinates.rasterQuery.1+json
.
By default, all responses use the newest format. While we try very hard to prevent backwards-incompatible breaks, please note that it may happen in future.
If you're using the URL endpoint (for example, rasterQuery.json
) you can pass a &v=1 parameter to specify version 1. Note that the current version is 1.
Compression
Add a request header with Accept-Encoding: gzip
to get compressed results. This dramatically reduces the size of the response and will speed up your API requests.
HTTP Method
GET
Parameters
- key: Required. Your Koordinates API key.
- layer: Required. The layer ID to get results from. The layer numbers can be found in the URL for a layer (eg. http://koordinates.com/layer/1132-land-environments-new-zealand-len... is layer 1132). Repeat this parameter to query more than one layer.
- x: Required. Longitude of the point you want to query, in decimal degrees (WGS84/EPSG:4326).
- y: Required. Latitude of the point you want to query, in decimal degrees (WGS84/EPSG:4326).
- callback: Optional. Only available for JSON formats. If supplied, will use the JSONP format with a callback of the given name. In addition, most error responses will be returned as 200-success codes, with a string error message.