curl --request POST \
--url https://api.eddy.engineer/v1/spatial.raster.contours \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"key": "<string>",
"base": 123,
"interval": 123,
"levels": [
123
],
"name": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/spatial.raster.contours"
payload = {
"key": "<string>",
"base": 123,
"interval": 123,
"levels": [123],
"name": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({key: '<string>', base: 123, interval: 123, levels: [123], name: '<string>'})
};
fetch('https://api.eddy.engineer/v1/spatial.raster.contours', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/spatial.raster.contours",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => '<string>',
'base' => 123,
'interval' => 123,
'levels' => [
123
],
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/spatial.raster.contours"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"base\": 123,\n \"interval\": 123,\n \"levels\": [\n 123\n ],\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/spatial.raster.contours")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"base\": 123,\n \"interval\": 123,\n \"levels\": [\n 123\n ],\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/spatial.raster.contours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"<string>\",\n \"base\": 123,\n \"interval\": 123,\n \"levels\": [\n 123\n ],\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"bbox": {},
"features": 123,
"frame": {},
"id": "<string>",
"key": "<string>",
"kind": "<string>",
"levels": [
{
"closed": 123,
"length": 123,
"level": 123,
"lines": 123
}
],
"lines": 123,
"method": "<string>",
"name": "<string>",
"of": {},
"points": 123,
"polygons": 123,
"product": "<string>",
"raster": "<string>",
"source": {}
}Contour lines of any raster as a vector document (EG13)
Contours a raster (terrain or a quantity) at levels (strictly increasing, in the raster’s unit) or at every interval from base within its samples, and stores the lines as a vector document in the raster’s frame: one LineString feature per line with level, closed and, for a quantity raster, kind and unit. Method: marching squares on the node-registered grid. A sample at or above a level is above it; a cell edge whose ends are on different sides carries one crossing at the linear interpolation of its two samples; the saddle cell is decided by the bilinear interpolant itself (the above corners join when (a − L)(c − L) >= (b − L)(d − L)); lines are chained by the edges they cross, never by coordinates, with the higher side on their left; open lines first, then loops, in edge order. The domain is the cells whose four corners are samples: a line ends only on the raster’s edge or the rim of a hole. The same input gives the same document, byte for byte. GDAL’s contour generator agrees on every crossing; it extends half a pixel past the outer samples and joins a saddle along a fixed diagonal, which this does not. Refusals: CONTOUR_LEVELS (none, not increasing, not finite, an interval that meets no sample), CONTOUR_BUDGET (cells × levels over one call’s budget).
curl --request POST \
--url https://api.eddy.engineer/v1/spatial.raster.contours \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"key": "<string>",
"base": 123,
"interval": 123,
"levels": [
123
],
"name": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/spatial.raster.contours"
payload = {
"key": "<string>",
"base": 123,
"interval": 123,
"levels": [123],
"name": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({key: '<string>', base: 123, interval: 123, levels: [123], name: '<string>'})
};
fetch('https://api.eddy.engineer/v1/spatial.raster.contours', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/spatial.raster.contours",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => '<string>',
'base' => 123,
'interval' => 123,
'levels' => [
123
],
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/spatial.raster.contours"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"base\": 123,\n \"interval\": 123,\n \"levels\": [\n 123\n ],\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/spatial.raster.contours")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"base\": 123,\n \"interval\": 123,\n \"levels\": [\n 123\n ],\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/spatial.raster.contours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"<string>\",\n \"base\": 123,\n \"interval\": 123,\n \"levels\": [\n 123\n ],\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"bbox": {},
"features": 123,
"frame": {},
"id": "<string>",
"key": "<string>",
"kind": "<string>",
"levels": [
{
"closed": 123,
"length": 123,
"level": 123,
"lines": 123
}
],
"lines": 123,
"method": "<string>",
"name": "<string>",
"of": {},
"points": 123,
"polygons": 123,
"product": "<string>",
"raster": "<string>",
"source": {}
}Body
Response
OK