Skip to main content

Trying to turn the following json response from a HTTPCaller (hitting the ESRI Roads & Highways LRS Service - measureToGeometry) into line geometry.

Worth noting is that the line points are in tX,Y,Z,M], so I guess if I am able to remove the Z and M, I should be able to use the Geometry Replacer.

{"spatialReference":{"wkid":3857},"locations":>{"status":"esriLocatingOK","routeId":"S001920030W","geometryType":"esriGeometryPolyline","geometry":{"hasZ":true,"hasM":true,"paths":oly-10415371.759930966,5162233.8351752404,0,179.327719443608],3-10415353.016318941,5162235.5338697936,0,179.31902059650747],3-10415173.989513392,5162253.0877756234,0,179.23587763117393],3-10414937.441137116,5162275.1197145516,0,179.12607168131217],7-10414712.804785877,5162297.1376164714,0,179.02174782997463],2-10414626.694503454,5162306.0776990149,0,178.98173415283964],6-10414577.001150453,5162309.6976211928,0,178.95870487764478],7-10414527.307759741,5162313.317119943,0,178.93567554029869],2-10414397.626339536,5162319.5500039952,0,178.87566648887878],7-10414310.829779875,5162320.9713228904,0,178.83554270499735],0-10414219.267391389,5162321.3697635373,0,178.79322107345797],9-10414038.525341231,5162322.5043579964,0,178.70967825656408],8-10413832.253641104,5162321.9418853559,0,178.61433668066456],2-10413625.983360801,5162323.7665091734,0,178.51899237075122],5-10413381.248851223,5162323.898761698,0,178.4058730898978],3-10413130.387584275,5162324.0277784066,0,178.28992197765911],0-10412921.781040879,5162324.848914952,0,178.19350077146373],2-10412712.608958075,5162325.6679260246,0,178.09681819120701]]]}}]}

the geometry portion of that json is in ESRI JSON, you can extract it, and then use a geometry replacer.

 

esrijson.fmw

the geometry portion of that json is in ESRI JSON, you can extract it, and then use a geometry replacer.

 

esrijson.fmw
No way! You're AWESOME! I was using the JSON Extractor... Guess I shoulda used the fragmenter instead 😛 THANK YOU!!!
No way! You're AWESOME! I was using the JSON Extractor... Guess I shoulda used the fragmenter instead 😛 THANK YOU!!!
The locations is an array, which is why I went with the fragmenter. The extractor would have worked with json["locations"][0]["geometry"] which would return the first (and in this case only) location.

 

 


Reply