Api session event editor measure import geotiffs: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
API Endpoint: editormeasure/import_geotiffs | API Endpoint: api/session/event/editormeasure/import_geotiffs/ | ||
Description: Import [[Measure]] [[GeoTIFF]] Collection | Description: Import [[Measure]] [[GeoTIFF]] Collection | ||
| Line 37: | Line 37: | ||
|OPTIONAL | |OPTIONAL | ||
|(Floating point number) | |(Floating point number) | ||
|Buffer for | |Buffer for [[#Api Model Point|Point]]s and Lines to make [[#Api Model Polygon|Polygon]]s (optional) | ||
| | | | ||
|- | |- | ||
| Line 67: | Line 67: | ||
"coordinates" : [ [ [ [ 658636.762, 6799451.896 ], [ 658636.762, 6799461.896 ], [ 658646.762, 6799461.896 ], [ 658646.762, 6799451.896 ], [ 658636.762, 6799451.896 ] ] ] ] | "coordinates" : [ [ [ [ 658636.762, 6799451.896 ], [ 658636.762, 6799461.896 ], [ 658646.762, 6799461.896 ], [ 658646.762, 6799451.896 ], [ 658636.762, 6799451.896 ] ] ] ] | ||
} ] | } ] | ||
}, 1, [ 1, 2 ] | }, 1, [ 1, 2 ] ] | ||
' | ' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 85: | Line 85: | ||
"coordinates" : [ [ [ [ 658656.762, 6799451.896 ], [ 658656.762, 6799461.896 ], [ 658666.762, 6799461.896 ], [ 658666.762, 6799451.896 ], [ 658656.762, 6799451.896 ] ] ] ] | "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, 2 ], [ 3, 4 ], [ 5, 6 ] ] | }, [ 1, 2, 3 ], [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] ] | ||
' | ' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 93: | Line 93: | ||
method: "POST", | method: "POST", | ||
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" }, | 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, 2 ] | 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, 2 ] ]' | ||
}; | }; | ||
fetch("https://engine.tygron.com/api/session/event/editormeasure/import_geotiffs/?crs=3857", options) | fetch("https://engine.tygron.com/api/session/event/editormeasure/import_geotiffs/?crs=3857", options) | ||
Latest revision as of 08:20, 29 May 2026
API Endpoint: api/session/event/editormeasure/import_geotiffs/
Description: Import Measure GeoTIFF Collection
| Name | Importance | Type | Description | Values |
|---|---|---|---|---|
| 0 | REQUIRED | (GeometryCollection with crs: EPSG:3857) | Collection of GeoTIFF Geometries where the GeoTIFF will be applied | |
| 1 | REQUIRED | (TERRAIN_TYPE Integer ID or multiple values in array [1, 2, 3]) | Terrain Type IDs | |
| 2 | REQUIRED | (Integer or multiple values in array [a, b, c]) | GeoTIFF ID arrays | |
| 3 | OPTIONAL | (MEASURE Integer ID) | Set for existing Measure ID (optional) | |
| 4 | OPTIONAL | (Floating point number) | Buffer for Points and Lines to make Polygons (optional) | |
| 5 | 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_geotiffs/?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, 2 ] ]
'Curl example multi item POST:
curl 'https://engine.tygron.com/api/session/event/editormeasure/import_geotiffs/?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, 2 ], [ 3, 4 ], [ 5, 6 ] ] ]
'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, 2 ] ]'
};
fetch("https://engine.tygron.com/api/session/event/editormeasure/import_geotiffs/?crs=3857", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));