How do you turn an encoded polyline into geometry?

884
1
07-29-2019 10:28 AM
by Anonymous User
Not applicable

For example I have this feed: https://511on.ca/api/v2/get/roadconditions?format=jsona

In a normal script I would use the polyline library to decode it. e.g.

array = arcpy.Array()
for coords in polyline.decode(EncodedPolyline):
    array.add(arcpy.Point(coords[1], coords[0]))
cur.insertRow([LocationDescription,arcpy.Polyline(array)])
‍‍‍

Is something similar possible in GeoEvent?

0 Kudos
1 Reply
BrianLomas
Occasional Contributor III

I am unaware of anything in GE that can handle this type of line. However, you could create a python script that would translate the data and send it to GE. We do something similar for parsing our avl data.

0 Kudos