Api session event editor area import

From Tygron Support wiki
Revision as of 08:38, 30 March 2026 by Frank@tygron.nl (talk | contribs) (Created page with "API Event to Import Area Collection {|class=wikitable !Name !Importance !Type !Description !Values |- |0 |REQUIRED |(GeometryCollection with crs: EPSG:3857) |Collection of Area geometries | |- |1 |REQUIRED |(String or multiple values in array ["a", "b", "c"]) |Area Names | |- |2 |REQUIRED |(String or multiple values in array ["a", "b", "c"]) |Attribute Names | |- |3 |REQUIRED |(Floating point number or multiple values in array [1.0, 2.0, 3.0] or matrix 1.0,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

API Event to Import Area Collection

Name Importance Type Description Values
0 REQUIRED (GeometryCollection with crs: EPSG:3857) Collection of Area geometries
1 REQUIRED (String or multiple values in array ["a", "b", "c"]) Area Names
2 REQUIRED (String or multiple values in array ["a", "b", "c"]) Attribute Names
3 REQUIRED (Floating point number or multiple values in array [1.0, 2.0, 3.0] or matrix [[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]]) Attribute Values
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[] (Integer array)
300-600 Codes Overview

Example POST

Example POST: https://engine.tygron.com/api/session/event/editorarea/import/?crs=3857&f=HTML&token=API_TOKEN

with content:

[ {
 "type" : "GeometryCollection",
 "geometries" : [ {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799369.467398971 ], [ 658656.1053124091, 6799369.467398971 ], [ 658656.1053124091, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799370.20474837 ], [ 658795.9288128645, 6799370.20474837 ], [ 658795.9288128645, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799412.186675567 ], [ 658721.5368832219, 6799412.186675567 ], [ 658721.5368832219, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 } ]
}, [ "Area Name 1", "Area Name 2", "Area Name 3" ], [ "Attribute Name 1", "Attribute Name 2" ], [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ], [ 7.0, 8.0 ], [ 9.0, 10.0 ], [ 11.0, 12.0 ] ], 0.5, "" ]