I am trying to create a query that will return a list of points that do not intersect with a line. For the most part it works great and very fast. However I would like to know how far away the nearest line is.
I have tried to use the st_distance function but it is returning null. Does anybody have any tips or guidance to help me solve this?
This is my SQL statement so far:
SELECT p.objectid, p.voidentifier, p.featuretypecd, p.heightagl, st_distance(p.geom::geography, l.geom::geography), p.geom
FROM vo_point p
LEFT JOIN vo_line l ON ST_Intersects(p.geom, l.geom)
WHERE l.featureid IS NULL
and p.featuretypecd in ('537','538','540','541','542','543','544');