Api session event editor measure import levees
API Endpoint: editormeasure/import_levees.
Description: Import Measure Levee Collection
| Name | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (GeometryCollection with crs: EPSG:3857) | Collection of Levee Geometries | |
| 1 | REQUIRED | (LEVEE Integer ID or multiple values in array [1, 2, 3]) | Levee IDs | |
| 2 | REQUIRED | (Floating point number or multiple values in array [1.0, 2.0, 3.0]) | Override Angles | |
| 3 | REQUIRED | (Floating point number or multiple values in array [1.0, 2.0, 3.0]) | Override Height sector | |
| 4 | REQUIRED | (Boolean or multiple values in array [true, false, true]) | Override relative height | |
| 5 | OPTIONAL | (MEASURE Integer ID) | Set for existing Measure ID (optional) | |
| 6 | OPTIONAL | (Floating point number) | Buffer for Points and Lines to make Polygons (optional) | |
| 7 | OPTIONAL | (SOURCE Integer ID) | Source (optional) |
Response Codes
| Response Code: | Description |
|---|---|
| 200 | Integer (Measure ID) |
| 300-600 | Codes Overview |
Example POST
Curl example POST:
curl 'https://engine.tygron.com/api/session/event/editormeasure/import_levees/?crs=3857' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '
[ {
"type" : "GeometryCollection",
"geometries" : [ {
"type" : "MultiPolygon",
"coordinates" : [ [ [ [ 658636.762, 6799451.896 ], [ 658636.762, 6799461.896 ], [ 658646.762, 6799461.896 ], [ 658646.762, 6799451.896 ], [ 658636.762, 6799451.896 ] ] ] ]
} ]
}, 1, 1.0, 1.0, true, "", "", "" ]
'Curl example multi item POST:
curl 'https://engine.tygron.com/api/session/event/editormeasure/import_levees/?crs=3857' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '
[ {
"type" : "GeometryCollection",
"geometries" : [ {
"type" : "MultiPolygon",
"coordinates" : [ [ [ [ 658636.762, 6799451.896 ], [ 658636.762, 6799461.896 ], [ 658646.762, 6799461.896 ], [ 658646.762, 6799451.896 ], [ 658636.762, 6799451.896 ] ] ] ]
}, {
"type" : "MultiPolygon",
"coordinates" : [ [ [ [ 658646.762, 6799451.896 ], [ 658646.762, 6799461.896 ], [ 658656.762, 6799461.896 ], [ 658656.762, 6799451.896 ], [ 658646.762, 6799451.896 ] ] ] ]
}, {
"type" : "MultiPolygon",
"coordinates" : [ [ [ [ 658656.762, 6799451.896 ], [ 658656.762, 6799461.896 ], [ 658666.762, 6799461.896 ], [ 658666.762, 6799451.896 ], [ 658656.762, 6799451.896 ] ] ] ]
} ]
}, [ 1, 2, 3 ], [ 1.0, 2.0, 3.0 ], [ 1.0, 2.0, 3.0 ], [ true, false, true ], "", "", "" ]
'JavaScript example POST:
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '[ { "type" : "GeometryCollection", "geometries" : [ { "type" : "MultiPolygon", "coordinates" : [ [ [ [ 658636.762, 6799451.896 ], [ 658636.762, 6799461.896 ], [ 658646.762, 6799461.896 ], [ 658646.762, 6799451.896 ], [ 658636.762, 6799451.896 ] ] ] ] } ]}, 1, 1.0, 1.0, true, "", "", "" ]'
};
fetch("https://engine.tygron.com/api/session/event/editormeasure/import_levees/?crs=3857", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));