Api session event editor netline insert and add for points

From Tygron Support wiki
Jump to navigation Jump to search

API Event to Insert one point into the first Net Line and a second point into the Second Net Line and potentially connect these two points with a new Net Line with a specified Net Function. Nodes are created for start and end point. Optionally connection the two points using the road system. Also specify at what distance the new Nodes are merged with existing Nodes.

Name Importance Type Description Values
0 REQUIRED (NET_FUNCTION Integer ID) Net Function ID
1 REQUIRED (Integer number) First Net Line ID
2 REQUIRED (Point 3D with crs: EPSG:3857) Start Point
3 REQUIRED (Integer number) Second Net Line ID
4 REQUIRED (Point 3D with crs: EPSG:3857) End Point
5 OPTIONAL (true, false) Connect via Roads (false = connect direct between points)
6 OPTIONAL (Floating point number) Node merge distance (optional, default: 1.0m)

Response Codes

Response Code: Description
204 No Content
300-600 Codes Overview

Example POST

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

with content:

[ 98, 60, {
 "type" : "Point",
 "coordinates" : [ 658660.2679732176, 6799311.923494666, -1.86 ]
}, 22, {
 "type" : "Point",
 "coordinates" : [ 658775.9795492238, 6799318.176305189, -0.34 ]
}, false, 1.0 ]