The island is a polygon, and the point is inside the polygon.
Need to calculate the
straight-line distance
I can think of a way:
step 1. Get closest point :
select ST_ClosestPoint(ST_Boundary(SetSRID(geometry, 26917)), srctable.srcpt) as ptNearest
step 2. Get the distance:
Math.Sqrt(Math.Pow(ptSrc.X - ptNearest.X, 2) + Math.Pow(ptSrc.Y - ptNearest.Y, 2));
Is there a better way?