1

It is as trivial to sample regularly along a line using st_line_sample(), as it is to calculate the middle point of a line using st_point_on_surface(). However, what I would like to do is to generate a single new point based on a given distance along a line from the first vertex. For example, given a line of length 200 metres of any geometry, return the XY coordinates along the line that is 55 metres from the start.

My question sounds similar to this, although it refers to calculating shortest paths (i.e., travelling salesman), which is different to what I am asking. It is more similar to this question, but the language is javascript and is as yet unanswered.

RDavey
  • 1,530
  • 10
  • 27
  • 1
    Hi! I think you can readapt the solution in this answer: https://stackoverflow.com/questions/67987924/find-coordinates-x-distance-along-linestring/67999593?noredirect=1#comment120191484_67999593 If you want I can add a more detailed answer. – agila Jul 06 '21 at 10:37
  • Thanks very much. I think I have enough from that linked question to solve my problem but if you wrote a similar answer to this question I would accept it. – RDavey Jul 13 '21 at 14:12

0 Answers0