Select to view content in your preferred language

applyEdits addCalibrationPoints returns Unable to complete operation

215
2
Jump to solution
02-21-2025 08:39 AM
Andy_Richardson
New Contributor

Hi All,

I'm getting the following error when attempting to addCalibrationPoints using the Linear Referencing Service applyEdits REST API function:
{'error': {'code': 500, 'message': 'Unable to complete operation.', 'details': []}}

  • I'm executing this from an ArcGIS Pro Python script tool.
  • Enterprise version is 11.3.
  • ArcGIS Pro version is 3.3 (though I don't think it matters because I'm calling applyEdits from Python).

I can manually add a calibration point in Pro using the Location Referencing Add Calibration Point tool; same service, same version.

This is what the applyEdits payload looks like:

https://MyServer/server/rest/services/MyService/MapServer/exts/LRServer/applyEdits
?f=json
&token=MyToken
&gdbVersion=MY.NAME@MY.ORG.AR_250212b
&sessionId={51777728-f672-4805-9831-b1800715f796}
&edits=
[
{"id": 1, "addCalibrationPoints": 
[
{ 
"networkLayerId": 3, 
"routeId": "LOC103431P", 
"fromDate": 1522972800000, 
"geometry": { "x": 441393.9140999997, "y": 3626705.8938999996}, "measure": 0.26968174 }
]
}
]

 

The CalibrationPoints service layer id is 1 and the Network service layer id is 3.

I don't believe geometry needs a spatialReference because the input geometry spatialReference matches the CalibrationPoints spatialReference, but I've tried it anyway with the same results.

I don't believe recalibrateRouteDownstream or retire are required either, but I've tried them anyway, with the same results.

I have successfully executed applyEdits to update Event fields (applyEdits/updates) and to retire a route (applyEdits/retireRoute) so it seems like I'm setting everything up properly. That basic workflow is:

  1. Get a sessionId and versionGuid
  2. startReading
  3. startEditing
  4. acquire a lock on the route
  5. applyEdits (response is 'Unable to complete operation.')
  6. release lock
  7. stopEditing
  8. stopReading

This workflow very closely follows a presentation at the 2021 Developer Summit for adding a calibration point:
https://www.youtube.com/watch?app=desktop&v=VQzW-EZCEKc

Thanks for any help!

 

0 Kudos
1 Solution

Accepted Solutions
Andy_Richardson
New Contributor

I resolved the problem, it was as simple as including the geometry "z" value since calibration points are PointZ geometry.

"geometry": { "x": 441393.9140999997, "y": 3626705.8938999996, "z": 0}, "measure": 0.26968174 }

 

View solution in original post

2 Replies
Andy_Richardson
New Contributor

I resolved the problem, it was as simple as including the geometry "z" value since calibration points are PointZ geometry.

"geometry": { "x": 441393.9140999997, "y": 3626705.8938999996, "z": 0}, "measure": 0.26968174 }

 

AyanPalit
Esri Regular Contributor

@Andy_Richardson thanks for posting the solution - its the little things.

Ayan Palit | Principal Consultant Esri