Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Find the nearest Lat/Long cordinate

Author  Topic 

spatialuser
Starting Member

1 Post

Posted - 2012-09-10 : 14:46:38
I have a list of Latitude and Longitude in sequence (stored as geogprahy) for a travel route of a ship .

For eg from Amsterdam to - Denmark following are the Lat/long cordinates of the route defined

1. 52.37560 4.48242 (Amsterdam)
2. 53.17312 4.35059
3. 53.85253 5.66895
4. 54.26522 7.07520
5. 55.10352 8.48145 (Denmark)


The position of the ship is updated frequently which would be the nearby cordinates from the above list.

how to find the next cordinates from the above list when ship position is updated.

for eg- When a ship position is updated to 53.43572, 6.94336. the query should list out the remaining cordinates from the above list starting from 53.85253 5.66895(considering that
it was the latest cordinate crossed by the ship)
Thanks in advance
   

- Advertisement -