Api session event editor building import: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
API Event to Import [[Building]] Collection
API Event to Import Building 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 [[Building]] geometries
|Collection of Building 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"])
|[[Building]] Names
|Building Names
|
|
|-
|-
Line 34: Line 34:
|REQUIRED
|REQUIRED
|(FUNCTION Integer ID or multiple values in array [1, 2, 3])
|(FUNCTION Integer ID or multiple values in array [1, 2, 3])
|[[Function]]s
|[[Function]]
|
|
|-
|-
Line 52: Line 52:
|OPTIONAL
|OPTIONAL
|(SOURCE Integer ID)
|(SOURCE Integer ID)
|[[Source]] (optional)
|Source (optional)
|
|
|}
|}
Line 74: Line 74:
  "geometries" : [ {
  "geometries" : [ {
  "type" : "MultiPolygon",
  "type" : "MultiPolygon",
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799378.893782711 ], [ 658694.2302830761, 6799378.893782711 ], [ 658694.2302830761, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  "coordinates" : [ [ [ [ 657384.7571861652, 6801356.7198541 ], [ 657384.7571861652, 6801201.75384843 ], [ 657393.5636893619, 6801201.75384843 ], [ 657393.5636893619, 6801356.7198541 ], [ 657384.7571861652, 6801356.7198541 ] ] ] ]
  }, {
  }, {
  "type" : "MultiPolygon",
  "type" : "MultiPolygon",
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799302.053808507 ], [ 658779.8726034408, 6799302.053808507 ], [ 658779.8726034408, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  "coordinates" : [ [ [ [ 657384.7571861652, 6801356.7198541 ], [ 657384.7571861652, 6801205.910907266 ], [ 657433.1076666379, 6801205.910907266 ], [ 657433.1076666379, 6801356.7198541 ], [ 657384.7571861652, 6801356.7198541 ] ] ] ]
  }, {
  }, {
  "type" : "MultiPolygon",
  "type" : "MultiPolygon",
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799409.805707025 ], [ 658720.084905554, 6799409.805707025 ], [ 658720.084905554, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  "coordinates" : [ [ [ [ 657384.7571861652, 6801356.7198541 ], [ 657384.7571861652, 6801235.845367823 ], [ 657544.153107057, 6801235.845367823 ], [ 657544.153107057, 6801356.7198541 ], [ 657384.7571861652, 6801356.7198541 ] ] ] ]
  } ]
  } ]
}, [ "Building Name 1", "Building Name 2", "Building 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 ] ], [ 1, 2, 3 ], [ 1, 2, 3 ], 0.5, "" ]
}, [ "Building Name 1", "Building Name 2", "Building 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 ] ], [ 1, 2, 3 ], [ 1, 2, 3 ], 0.5, "" ]

Revision as of 13:44, 30 March 2026

API Event to Import Building Collection

Name Importance Type Description Values
0 REQUIRED (GeometryCollection with crs: EPSG:3857) Collection of Building geometries
1 REQUIRED (String or multiple values in array ["a", "b", "c"]) Building 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 REQUIRED (FUNCTION Integer ID or multiple values in array [1, 2, 3]) Function
5 REQUIRED (Integer number or multiple values in array [1, 2, 3]) Owners
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[] (Integer array)
300-600 Codes Overview

Example POST

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

with content:

[ {
 "type" : "GeometryCollection",
 "geometries" : [ {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 657384.7571861652, 6801356.7198541 ], [ 657384.7571861652, 6801201.75384843 ], [ 657393.5636893619, 6801201.75384843 ], [ 657393.5636893619, 6801356.7198541 ], [ 657384.7571861652, 6801356.7198541 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 657384.7571861652, 6801356.7198541 ], [ 657384.7571861652, 6801205.910907266 ], [ 657433.1076666379, 6801205.910907266 ], [ 657433.1076666379, 6801356.7198541 ], [ 657384.7571861652, 6801356.7198541 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 657384.7571861652, 6801356.7198541 ], [ 657384.7571861652, 6801235.845367823 ], [ 657544.153107057, 6801235.845367823 ], [ 657544.153107057, 6801356.7198541 ], [ 657384.7571861652, 6801356.7198541 ] ] ] ]
 } ]
}, [ "Building Name 1", "Building Name 2", "Building 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 ] ], [ 1, 2, 3 ], [ 1, 2, 3 ], 0.5, "" ]