1

I want to calculate the angle of two lines of a routing network exactly at the "touching point" (the topological vertex). My previous attempt was using the ST_ANGLE() function of PostGIS, which gave me a "wrong" result of 76° for the point 4060 between line [16543,4060] and line [4060,3382], since ST_ANGLE() takes the beginning and end node of the input lines to measure the angle betwen those two.

enter image description here

ST_LineInterpolatePoint to generate auxiliary points close to the node isn't that easy also due to the different orientations of the edges.

1
  • 1
    I don't really understand, is it only one line ? Or do you have multiple lines? If it's lines they are composed of points, so if you take the nearest point of 4060 (using for example ST_PointN) for your 2 lines it should work no? Maybe you can show use some code to better understand what you do and why it doesn't work. – robin loche Oct 2 '19 at 12:21

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.