I know that postgis has the function to find the start and end point of a line. Is there a function that can swap the start point and end point?

(Note: I do not mean literally changing the co-ordinates).

You could also describe it as switching direction of a linestring.

Or in technical terms I think we just have to reverse the sequence of coordinates.

I know a gis tool which does this, but is there postgis counterpart?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.