Is there a python polyline decoder that keep the 3d information?

I used the direction service to get the polyline with elevation. However, when I transformed it in points using the polyline module, the tuple containing the coordinate data doesn’t contain the elevation (only the x and y) and they are wrong. The polyline module works when elevation is false. I was wondering if there was a module that could fixe my problem or if someone had another solution to obtain only the points with the elevation from a direction request ?

Polyline :

I have also found a python version of a decoder for a 2d polyline but it have the seame problem with elevation. If someone knows how to modify it so that it accepts the elevation pls help me:

Hi @Samson,

I’m not sure what you are refering to with the polyline module.
Best post a specific request you send and what you were expecting. (without api_key)

The openrouteservice-py package should be handeling your problems.
If you want to decode the polyline yourself take a look at these examples
Or the method in the openrouteservice-py package:

Best regards

You made my day ! :slight_smile: