curl --request POST \
--url https://api.eddy.engineer/v1/spatial.import \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"arc_sagitta_m": 123,
"blob": "<string>",
"dbf_base64": "<string>",
"dbf_blob": "<string>",
"epsg": 123,
"frame": {},
"georeference": "<string>",
"layers": [
"<string>"
],
"name": "<string>",
"payload_base64": "<string>",
"polygons": true,
"prj": "<string>",
"roadgraph_key": "<string>",
"step_m": 123,
"table": "<string>",
"text": "<string>",
"units": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/spatial.import"
payload = {
"arc_sagitta_m": 123,
"blob": "<string>",
"dbf_base64": "<string>",
"dbf_blob": "<string>",
"epsg": 123,
"frame": {},
"georeference": "<string>",
"layers": ["<string>"],
"name": "<string>",
"payload_base64": "<string>",
"polygons": True,
"prj": "<string>",
"roadgraph_key": "<string>",
"step_m": 123,
"table": "<string>",
"text": "<string>",
"units": "<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({
arc_sagitta_m: 123,
blob: '<string>',
dbf_base64: '<string>',
dbf_blob: '<string>',
epsg: 123,
frame: {},
georeference: '<string>',
layers: ['<string>'],
name: '<string>',
payload_base64: '<string>',
polygons: true,
prj: '<string>',
roadgraph_key: '<string>',
step_m: 123,
table: '<string>',
text: '<string>',
units: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/spatial.import', 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.import",
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([
'arc_sagitta_m' => 123,
'blob' => '<string>',
'dbf_base64' => '<string>',
'dbf_blob' => '<string>',
'epsg' => 123,
'frame' => [
],
'georeference' => '<string>',
'layers' => [
'<string>'
],
'name' => '<string>',
'payload_base64' => '<string>',
'polygons' => true,
'prj' => '<string>',
'roadgraph_key' => '<string>',
'step_m' => 123,
'table' => '<string>',
'text' => '<string>',
'units' => '<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.import"
payload := strings.NewReader("{\n \"arc_sagitta_m\": 123,\n \"blob\": \"<string>\",\n \"dbf_base64\": \"<string>\",\n \"dbf_blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"georeference\": \"<string>\",\n \"layers\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"payload_base64\": \"<string>\",\n \"polygons\": true,\n \"prj\": \"<string>\",\n \"roadgraph_key\": \"<string>\",\n \"step_m\": 123,\n \"table\": \"<string>\",\n \"text\": \"<string>\",\n \"units\": \"<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.import")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"arc_sagitta_m\": 123,\n \"blob\": \"<string>\",\n \"dbf_base64\": \"<string>\",\n \"dbf_blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"georeference\": \"<string>\",\n \"layers\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"payload_base64\": \"<string>\",\n \"polygons\": true,\n \"prj\": \"<string>\",\n \"roadgraph_key\": \"<string>\",\n \"step_m\": 123,\n \"table\": \"<string>\",\n \"text\": \"<string>\",\n \"units\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/spatial.import")
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 \"arc_sagitta_m\": 123,\n \"blob\": \"<string>\",\n \"dbf_base64\": \"<string>\",\n \"dbf_blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"georeference\": \"<string>\",\n \"layers\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"payload_base64\": \"<string>\",\n \"polygons\": true,\n \"prj\": \"<string>\",\n \"roadgraph_key\": \"<string>\",\n \"step_m\": 123,\n \"table\": \"<string>\",\n \"text\": \"<string>\",\n \"units\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"dxf": {},
"format": "<string>",
"frame_from": {},
"id": "<string>",
"key": "<string>",
"kind": "vector",
"name": "<string>"
}Import a format (SP9)
format = kml | kmz | gpx | shapefile | gpkg → an SP3 vector document (KML Placemarks with Point / LineString / Polygon / MultiGeometry, name, description, ExtendedData and — SP9.b — shared, mapped and inline Styles read into the simplestyle properties stroke / stroke-opacity / stroke-width / fill / fill-opacity / marker-color, which the globe page draws; KMZ through an own zip reader; GPX waypoints, tracks and routes; a shapefile’s .shp as the payload with dbf_base64 and the .prj text — WGS 84 geographic or a WGS 84 UTM zone, typed refusal otherwise; a GeoPackage read by an own SQLite reader — the features table named by table or the only one, its geometry column and its SRS from the meta tables, EPSG 4326 geodetic or a vendored projected code, anything else refused CRS, GeoPackageBinary / WKB geometries, typed attributes, the geopackage record in the answer); opendrive → an SP5 road graph (the roads’ reference lines — line, arc, spiral, poly3, paramPoly3 — sampled every step_m, the road type and driving-lane counts as tags, predecessor / successor links and junction connections joined, the header’s geoReference read for a UTM zone and kept in the graph’s source); lanelet2 → an SP5 road graph (SP9.b: each lanelet’s centreline from its left and right bounds, joined where lanelets share their bound ends, the relation’s tags on the edges, one-way unless one_way=no; regulatory elements and areas counted); openscenario → an SP3 vector document (SP9.b: the entities where the Init places them with their speeds, headings and assigned routes, in the road network’s frame — pass georeference, the OpenDRIVE header’s, or roadgraph_key of the imported OpenDRIVE, whose reference lines also resolve LanePosition / RoadPosition at s; the storyboard’s events listed in the openscenario record; relative and catalog positions listed as unresolved); plan | wpl → a mission (QGroundControl .plan SimpleItems, and — SP9.b — ComplexItems: a survey, CorridorScan or StructureScan saved by QGC carries its own Items and they are taken verbatim; without them the transects / corridor lines / structure rings are generated here from the polygon or polyline and the camera parameters, recorded under the mission’s source.complex; or QGC WPL 110). The payload is text or payload_base64. Own dialects: emit → parse → emit is a byte fixed point for KML, GPX, .plan, WPL and GeoPackage. UD14: a shapefile’s .prj may name GDA94 or GDA2020 geographic (the geodetic frame under the datum law: GDA is WGS 84 at the metre level, no datum shift is applied) or a Map Grid of Australia zone (GDA94 zones 48–58, GDA2020 zones 46–59, resolved through the vendored EPSG table, with every projection parameter the text states checked against the zone); other projections refuse PRJ by name. A shapefile with no .prj takes the frame the caller states (frame or epsg); a .prj is the file’s own word, so a stated frame that differs from it refuses, and a stated geodetic frame over coordinates that are not degrees refuses. The answer’s frame_from says where the frame came from (prj | stated), with the datum and the EPSG code. EG14: dxf → an SP3 vector document of an ASCII DXF’s model space (a CAD site plan), in metres in the frame the caller states with frame or epsg (a DXF names no coordinate system; a geodetic frame refuses FRAME). The unit is units when stated, else the file’s $INSUNITS; with neither the import refuses DXF_UNITS rather than guess; the answer’s dxf.units says which was used and what the file says. Read: LINE, POINT, LWPOLYLINE and POLYLINE (closed ones as closed lines with closed: true, or as Polygons with polygons), CIRCLE and ARC (with centre, radius, start_deg, end_deg kept beside the chords). Curves are flattened to chords within arc_sagitta_m of the true curve (1 mm unless stated) on the engine’s own series, or a polyline’s bulged segments are taken as straight chords with bulges: “chords”; each feature says how many of its segments were arcs. Every feature keeps its layer, entity kind, handle and color index; layers keeps only the layers named. Entities drawn facing down (extrusion 0, 0, −1) are mirrored as the DXF reference says; other tilts are left out. What is not read is named with a count in dxf.left_out: block inserts, text, hatches, splines, ellipses, dimensions, paper space, polyline meshes, filtered layers. A binary DXF refuses DXF_BINARY. TL3c: blob (a blob id) instead of text or payload_base64, and dbf_blob instead of dbf_base64: each file is read from its blob as the caller and imported exactly as if sent inline; giving a file twice is 400 FILE_GIVEN_TWICE.
curl --request POST \
--url https://api.eddy.engineer/v1/spatial.import \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"arc_sagitta_m": 123,
"blob": "<string>",
"dbf_base64": "<string>",
"dbf_blob": "<string>",
"epsg": 123,
"frame": {},
"georeference": "<string>",
"layers": [
"<string>"
],
"name": "<string>",
"payload_base64": "<string>",
"polygons": true,
"prj": "<string>",
"roadgraph_key": "<string>",
"step_m": 123,
"table": "<string>",
"text": "<string>",
"units": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/spatial.import"
payload = {
"arc_sagitta_m": 123,
"blob": "<string>",
"dbf_base64": "<string>",
"dbf_blob": "<string>",
"epsg": 123,
"frame": {},
"georeference": "<string>",
"layers": ["<string>"],
"name": "<string>",
"payload_base64": "<string>",
"polygons": True,
"prj": "<string>",
"roadgraph_key": "<string>",
"step_m": 123,
"table": "<string>",
"text": "<string>",
"units": "<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({
arc_sagitta_m: 123,
blob: '<string>',
dbf_base64: '<string>',
dbf_blob: '<string>',
epsg: 123,
frame: {},
georeference: '<string>',
layers: ['<string>'],
name: '<string>',
payload_base64: '<string>',
polygons: true,
prj: '<string>',
roadgraph_key: '<string>',
step_m: 123,
table: '<string>',
text: '<string>',
units: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/spatial.import', 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.import",
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([
'arc_sagitta_m' => 123,
'blob' => '<string>',
'dbf_base64' => '<string>',
'dbf_blob' => '<string>',
'epsg' => 123,
'frame' => [
],
'georeference' => '<string>',
'layers' => [
'<string>'
],
'name' => '<string>',
'payload_base64' => '<string>',
'polygons' => true,
'prj' => '<string>',
'roadgraph_key' => '<string>',
'step_m' => 123,
'table' => '<string>',
'text' => '<string>',
'units' => '<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.import"
payload := strings.NewReader("{\n \"arc_sagitta_m\": 123,\n \"blob\": \"<string>\",\n \"dbf_base64\": \"<string>\",\n \"dbf_blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"georeference\": \"<string>\",\n \"layers\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"payload_base64\": \"<string>\",\n \"polygons\": true,\n \"prj\": \"<string>\",\n \"roadgraph_key\": \"<string>\",\n \"step_m\": 123,\n \"table\": \"<string>\",\n \"text\": \"<string>\",\n \"units\": \"<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.import")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"arc_sagitta_m\": 123,\n \"blob\": \"<string>\",\n \"dbf_base64\": \"<string>\",\n \"dbf_blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"georeference\": \"<string>\",\n \"layers\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"payload_base64\": \"<string>\",\n \"polygons\": true,\n \"prj\": \"<string>\",\n \"roadgraph_key\": \"<string>\",\n \"step_m\": 123,\n \"table\": \"<string>\",\n \"text\": \"<string>\",\n \"units\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/spatial.import")
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 \"arc_sagitta_m\": 123,\n \"blob\": \"<string>\",\n \"dbf_base64\": \"<string>\",\n \"dbf_blob\": \"<string>\",\n \"epsg\": 123,\n \"frame\": {},\n \"georeference\": \"<string>\",\n \"layers\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"payload_base64\": \"<string>\",\n \"polygons\": true,\n \"prj\": \"<string>\",\n \"roadgraph_key\": \"<string>\",\n \"step_m\": 123,\n \"table\": \"<string>\",\n \"text\": \"<string>\",\n \"units\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"dxf": {},
"format": "<string>",
"frame_from": {},
"id": "<string>",
"key": "<string>",
"kind": "vector",
"name": "<string>"
}Body
TL3c: a blob id (b3:<64 hex>: an upload's blob_id, an attachment's blob) holding the file, instead of text or payload_base64: read as the caller under the read gate (a blob the caller may not read answers 404 BLOB_NOT_FOUND, as an absent one) and imported exactly as if its contents were sent inline. Give one of the two (both: 400 FILE_GIVEN_TWICE).
TL3c: a blob id (b3:<64 hex>: an upload's blob_id, an attachment's blob) holding the file, instead of dbf_base64 (a shapefile's .dbf): read as the caller under the read gate (a blob the caller may not read answers 404 BLOB_NOT_FOUND, as an absent one) and imported exactly as if its contents were sent inline. Give one of the two (both: 400 FILE_GIVEN_TWICE).
shapefile with no .prj: the frame by its EPSG code instead of frame: 4326 (WGS 84), 4283 (GDA94) or 7844 (GDA2020) geographic, or a projected code of the vendored table (7855 = GDA2020 / MGA zone 55, 28355 = GDA94 / MGA zone 55, the UTM zones, …); another code refuses CRS; dxf: the same, for a drawing in a projected CRS
Response
OK