How do you turn an encoded polyline into geometry?

123
1
07-29-2019 10:28 AM
Highlighted
Occasional Contributor II

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?

Reply
0 Kudos
1 Reply
Highlighted
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.

Reply
0 Kudos