distance between two points across land using sql server
Posted
by dpwb
on Stack Overflow
See other posts from Stack Overflow
or by dpwb
Published on 2010-06-02T13:58:01Z
Indexed on
2010/06/02
22:44 UTC
Read the original article
Hit count: 385
I am looking to calculate the shortest distance between two points inside SQL Server 2008 taking into account land mass only.
I have used the geography data type along with STDistance() to work out point x distance to point y as the crow flies, however this sometimes crosses the sea which i am trying to avoid.
I have also created a polygon around the land mass boundary I am interested in.
I believe that I need to combine these two methods to ensure that STDistance always remains within polygon - unless there is a simpler solution.
Thanks for any advice
© Stack Overflow or respective owner