Api session event editor area import: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
API Event to Import Area Collection
API Event to Import [[Area]] Collection
{|class=wikitable
{|class=wikitable
!Name
!Name
Line 10: Line 10:
|REQUIRED
|REQUIRED
|(GeometryCollection with crs: EPSG:3857)
|(GeometryCollection with crs: EPSG:3857)
|Collection of Area geometries
|Collection of [[Area]] geometries
|
|
|-
|-
Line 16: Line 16:
|REQUIRED
|REQUIRED
|(String or multiple values in array ["a", "b", "c"])
|(String or multiple values in array ["a", "b", "c"])
|Area Names
|[[Area]] Names
|
|
|-
|-
Line 40: Line 40:
|OPTIONAL
|OPTIONAL
|(SOURCE Integer ID)
|(SOURCE Integer ID)
|Source (optional)
|[[Source]] (optional)
|
|
|}
|}
Line 55: Line 55:
|}
|}
===Example POST===
===Example POST===
Example POST: https://engine.tygron.com/api/session/event/editorarea/import/?crs=3857&f=HTML&token=API_TOKEN
Example POST: https://engine.tygron.com/api/session/event/editorarea/import/?crs=3857&f=JSON&token=API_TOKEN


with content:  
with content:  
Line 62: Line 62:
  "geometries" : [ {
  "geometries" : [ {
  "type" : "MultiPolygon",
  "type" : "MultiPolygon",
  "coordinates" : [ [ [ [ 657384.7571861652, 6801356.7198541 ], [ 657384.7571861652, 6801335.679145534 ], [ 657538.2203733041, 6801335.679145534 ], [ 657538.2203733041, 6801356.7198541 ], [ 657384.7571861652, 6801356.7198541 ] ] ] ]
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799421.895707333 ], [ 658737.3835790895, 6799421.895707333 ], [ 658737.3835790895, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  }, {
  }, {
  "type" : "MultiPolygon",
  "type" : "MultiPolygon",
  "coordinates" : [ [ [ [ 657384.7571861652, 6801356.7198541 ], [ 657384.7571861652, 6801285.116363176 ], [ 657433.2489995613, 6801285.116363176 ], [ 657433.2489995613, 6801356.7198541 ], [ 657384.7571861652, 6801356.7198541 ] ] ] ]
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799325.986640752 ], [ 658775.6498495967, 6799325.986640752 ], [ 658775.6498495967, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  }, {
  }, {
  "type" : "MultiPolygon",
  "type" : "MultiPolygon",
  "coordinates" : [ [ [ [ 657384.7571861652, 6801356.7198541 ], [ 657384.7571861652, 6801256.219773381 ], [ 657431.0185385968, 6801256.219773381 ], [ 657431.0185385968, 6801356.7198541 ], [ 657384.7571861652, 6801356.7198541 ] ] ] ]
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799360.575360278 ], [ 658782.0976698893, 6799360.575360278 ], [ 658782.0976698893, 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, "" ]
}, [ "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, "" ]
</pre>
</pre>
{{article end|seealso=*[[api session event editor area]]}}
{{article end|seealso=*[[Api session event editor area]]
*[[Api session items areas]]
}}


[[Category:API]]
[[Category:API]]

Latest revision as of 12:04, 1 April 2026

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=JSON&token=API_TOKEN

with content:

[ {
 "type" : "GeometryCollection",
 "geometries" : [ {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799421.895707333 ], [ 658737.3835790895, 6799421.895707333 ], [ 658737.3835790895, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799325.986640752 ], [ 658775.6498495967, 6799325.986640752 ], [ 658775.6498495967, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799360.575360278 ], [ 658782.0976698893, 6799360.575360278 ], [ 658782.0976698893, 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, "" ]