I am trying to find the intersection point of two lines of which I know 2 points.
For example, I have these 2 line segments:
select st_geometryfromtext('LINESTRING (4.50554487780521 51.922119943633575, 4.504656820078167 51.92231795217855)', 4326),
st_geometryfromtext('LINESTRING (4.505476754241158 51.92221504789901, 4.505379267847784 51.92221833721103)', 4326)
As it can be seen on the map,they do not have an intersection point:
What I am interested in finding is the intersection point of the lines which these segments belong to, as shown below:
Best Answer
Just extend (extrapolate) one of your lines and get the intersection point as:
extrapolation example from How to extend a straight line in postgis?