Api session event editor measure import upgrades: 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 16: Line 16:
|REQUIRED
|REQUIRED
|(UPGRADE_TYPE Integer ID or multiple values in array [1, 2, 3])
|(UPGRADE_TYPE Integer ID or multiple values in array [1, 2, 3])
|[[Upgrade Type]]s
|[[Upgrade Type]]
|
|
|-
|-
Line 49: Line 49:
|}
|}
===Example POST===
===Example POST===
Example POST: https://engine.tygron.com/api/session/event/editormeasure/import_upgrades/?crs=3857&f=HTML&token=API_TOKEN
Example POST: https://engine.tygron.com/api/session/event/editormeasure/import_upgrades/?crs=3857&f=JSON&token=API_TOKEN


with content:  
with content:  
Line 56: Line 56:
  "geometries" : [ {
  "geometries" : [ {
  "type" : "MultiPolygon",
  "type" : "MultiPolygon",
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799311.150420244 ], [ 658715.9888343253, 6799311.150420244 ], [ 658715.9888343253, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799433.555331129 ], [ 658686.978515417, 6799433.555331129 ], [ 658686.978515417, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  }, {
  }, {
  "type" : "MultiPolygon",
  "type" : "MultiPolygon",
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799358.73848556 ], [ 658716.4224786623, 6799358.73848556 ], [ 658716.4224786623, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799320.279524361 ], [ 658699.4242703042, 6799320.279524361 ], [ 658699.4242703042, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  }, {
  }, {
  "type" : "MultiPolygon",
  "type" : "MultiPolygon",
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799433.7421061285 ], [ 658740.7357959873, 6799433.7421061285 ], [ 658740.7357959873, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799345.92909757 ], [ 658653.2192225703, 6799345.92909757 ], [ 658653.2192225703, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
  } ]
  } ]
}, [ 1, 2, 3 ], "", "", "" ]
}, [ 1, 2, 3 ], "", "", "" ]
</pre>
</pre>
{{article end|seealso=*[[api session event editor measure]]}}
{{article end|seealso=*[[Api session event editor measure]]
*[[Api session items measures]]
}}


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

Latest revision as of 12:07, 1 April 2026

API Event to Import Measure Upgrade Collection

Name Importance Type Description Values
0 REQUIRED (GeometryCollection with crs: EPSG:3857) Collection of Upgrade Geometries
1 REQUIRED (UPGRADE_TYPE Integer ID or multiple values in array [1, 2, 3]) Upgrade Type
2 OPTIONAL (MEASURE Integer ID) Set for existing Measure ID (optional)
3 OPTIONAL (Floating point number) Buffer for Points and Lines to make Polygons (optional)
4 OPTIONAL (SOURCE Integer ID) Source (optional)

Response Codes

Response Code: Description
200 Integer (Measure ID)
300-600 Codes Overview

Example POST

Example POST: https://engine.tygron.com/api/session/event/editormeasure/import_upgrades/?crs=3857&f=JSON&token=API_TOKEN

with content:

[ {
 "type" : "GeometryCollection",
 "geometries" : [ {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799433.555331129 ], [ 658686.978515417, 6799433.555331129 ], [ 658686.978515417, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799320.279524361 ], [ 658699.4242703042, 6799320.279524361 ], [ 658699.4242703042, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 }, {
 "type" : "MultiPolygon",
 "coordinates" : [ [ [ [ 658636.7618515313, 6799461.8964563515 ], [ 658636.7618515313, 6799345.92909757 ], [ 658653.2192225703, 6799345.92909757 ], [ 658653.2192225703, 6799461.8964563515 ], [ 658636.7618515313, 6799461.8964563515 ] ] ] ]
 } ]
}, [ 1, 2, 3 ], "", "", "" ]