curl --request POST \
--url https://api.eddy.engineer/v1/spatial.raster.quantity \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"blob": "<string>",
"epsg": 123,
"frame": {},
"height": 123,
"id": "<string>",
"name": "<string>",
"origin": [
123
],
"source": {},
"step": [
123
],
"tiff_base64": "<string>",
"values": [
123
],
"width": 123
}
'import requests
url = "https://api.eddy.engineer/v1/spatial.raster.quantity"
payload = {
"blob": "<string>",
"epsg": 123,
"frame": {},
"height": 123,
"id": "<string>",
"name": "<string>",
"origin": [123],
"source": {},
"step": [123],
"tiff_base64": "<string>",
"values": [123],
"width": 123
}
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({
blob: '<string>',
epsg: 123,
frame: {},
height: 123,
id: '<string>',
name: '<string>',
origin: [123],
source: {},
step: [123],
tiff_base64: '<string>',
values: [123],
width: 123
})
};
fetch('https://api.eddy.engineer/v1/spatial.raster.quantity', 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.quantity",
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([
'blob' => '<string>',
'epsg' => 123,
'frame' => [
],
'height' => 123,
'id' => '<string>',
'name' => '<string>',
'origin' => [
123
],
'source' => [
],
'step' => [
123
],
'tiff_base64' => '<string>',
'values' => [
123
],
'width' => 123
]),
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.quantity"
payload := strings.NewReader("{\n \"blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"height\": 123,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"origin\": [\n 123\n ],\n \"source\": {},\n \"step\": [\n 123\n ],\n \"tiff_base64\": \"<string>\",\n \"values\": [\n 123\n ],\n \"width\": 123\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.quantity")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"height\": 123,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"origin\": [\n 123\n ],\n \"source\": {},\n \"step\": [\n 123\n ],\n \"tiff_base64\": \"<string>\",\n \"values\": [\n 123\n ],\n \"width\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/spatial.raster.quantity")
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 \"blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"height\": 123,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"origin\": [\n 123\n ],\n \"source\": {},\n \"step\": [\n 123\n ],\n \"tiff_base64\": \"<string>\",\n \"values\": [\n 123\n ],\n \"width\": 123\n}"
response = http.request(request)
puts response.read_body{
"extent": [
123
],
"frame": {},
"height": 123,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"nodata": 123,
"origin": [
123
],
"quantity": {
"kind": "<string>",
"unit": "<string>"
},
"raster": "<string>",
"samples": "<string>",
"source": {},
"source_hash": "<string>",
"stats": {},
"step": [
123
],
"tiff": {},
"width": 123
}A quantity raster from values or a GeoTIFF (EG13)
Stores a QUANTITY raster: a raster whose samples are not heights but values of a stated quantity — a value kind and a unit, such as a surface potential in V, a step voltage in V/m, a resistivity in Ω·m, a noise level in dB. The quantity takes the place of height_kind in the raster document (ss.spatial.raster/1); everything else is the terrain raster’s: the frame, the node-registered grid (origin is the centre of the north-west sample; columns go east, rows go south), the f32 samples blob, holes. Pass values (row-major from the north-west, null a hole) with quantity, the frame (frame or epsg), origin, step, width and height; or a GeoTIFF as tiff_base64 / blob, whose quantity is the stated one or the file’s own (GDAL’s band description and unit type) and which refuses RASTER_KIND when the file states a vertical CRS. The engine does not interpret the kind or convert the unit: both ride with every answer made from the raster. GET /v1/spatial.raster/{key}, .tiff (no vertical CRS; the unit and kind in GDAL’s metadata tag), .sample and .png?what=value serve it; what reads heights (.derive, .los, .viewshed, .profile, .tin, terrain tiles, an AGL ground) refuses RASTER_NOT_TERRAIN. POST /v1/spatial.raster.contours and .bands draw it.
curl --request POST \
--url https://api.eddy.engineer/v1/spatial.raster.quantity \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"blob": "<string>",
"epsg": 123,
"frame": {},
"height": 123,
"id": "<string>",
"name": "<string>",
"origin": [
123
],
"source": {},
"step": [
123
],
"tiff_base64": "<string>",
"values": [
123
],
"width": 123
}
'import requests
url = "https://api.eddy.engineer/v1/spatial.raster.quantity"
payload = {
"blob": "<string>",
"epsg": 123,
"frame": {},
"height": 123,
"id": "<string>",
"name": "<string>",
"origin": [123],
"source": {},
"step": [123],
"tiff_base64": "<string>",
"values": [123],
"width": 123
}
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({
blob: '<string>',
epsg: 123,
frame: {},
height: 123,
id: '<string>',
name: '<string>',
origin: [123],
source: {},
step: [123],
tiff_base64: '<string>',
values: [123],
width: 123
})
};
fetch('https://api.eddy.engineer/v1/spatial.raster.quantity', 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.quantity",
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([
'blob' => '<string>',
'epsg' => 123,
'frame' => [
],
'height' => 123,
'id' => '<string>',
'name' => '<string>',
'origin' => [
123
],
'source' => [
],
'step' => [
123
],
'tiff_base64' => '<string>',
'values' => [
123
],
'width' => 123
]),
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.quantity"
payload := strings.NewReader("{\n \"blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"height\": 123,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"origin\": [\n 123\n ],\n \"source\": {},\n \"step\": [\n 123\n ],\n \"tiff_base64\": \"<string>\",\n \"values\": [\n 123\n ],\n \"width\": 123\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.quantity")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"height\": 123,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"origin\": [\n 123\n ],\n \"source\": {},\n \"step\": [\n 123\n ],\n \"tiff_base64\": \"<string>\",\n \"values\": [\n 123\n ],\n \"width\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/spatial.raster.quantity")
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 \"blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"height\": 123,\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"origin\": [\n 123\n ],\n \"source\": {},\n \"step\": [\n 123\n ],\n \"tiff_base64\": \"<string>\",\n \"values\": [\n 123\n ],\n \"width\": 123\n}"
response = http.request(request)
puts response.read_body{
"extent": [
123
],
"frame": {},
"height": 123,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"nodata": 123,
"origin": [
123
],
"quantity": {
"kind": "<string>",
"unit": "<string>"
},
"raster": "<string>",
"samples": "<string>",
"source": {},
"source_hash": "<string>",
"stats": {},
"step": [
123
],
"tiff": {},
"width": 123
}