Api session event editor netline insert and add for points
Jump to navigation
Jump to search
API Endpoint: editornetline/insert_and_add_for_points.
Description: 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
Curl example POST:
curl 'https://engine.tygron.com/api/session/event/editornetline/insert_and_add_for_points/?crs=3857' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '
[ 1, 1, {
"type" : "Point",
"coordinates" : [ 658673.0076967378, 6799335.414597969, -0.29 ]
}, 1, {
"type" : "Point",
"coordinates" : [ 658755.3237863822, 6799402.693663963, -1.41 ]
}, false, 1.0 ]
'Curl example multi item POST:
curl 'https://engine.tygron.com/api/session/event/editornetline/insert_and_add_for_points/?crs=3857' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '
[ 1, 1, {
"type" : "Point",
"coordinates" : [ 658667.5132443323, 6799426.794079066, -0.42 ]
}, 1, {
"type" : "Point",
"coordinates" : [ 658784.5907187933, 6799450.970900224, -1.29 ]
}, false, 1.0 ]
'JavaScript example POST:
var options = {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
body: '[ 1, 1, { "type" : "Point", "coordinates" : [ 658673.0076967378, 6799335.414597969, -0.29 ]}, 1, { "type" : "Point", "coordinates" : [ 658755.3237863822, 6799402.693663963, -1.41 ]}, false, 1.0 ]'
};
fetch("https://engine.tygron.com/api/session/event/editornetline/insert_and_add_for_points/?crs=3857", options)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));