![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a database with positional information in it along the lines of waypoints of various journeys ('tracks'). I am currenetly using SQL Server 2000 so am unable to make use of the GIS types. The columns are simply two floatst for lat and long, a timestamp and a track ID. I would like to produce a query that will linearly interpolate between the waypoints and tell me which tracks, if any were in a certain ellipse at a given time. I have constructed a very inefficient query to do this, but it takes far too long to compute. Essentially my query does this: 1. For each unique track, get the waypoint before and after the given time. I think i have to use 2 self joins to achieve this. 2. Use these fields to produce a row in a temp table for each track that gives the estimated lat and long for each track at the given time 3. Use a complicated trigonometric expression to filter any tracks not in the ellipse Clearly this is very inefficient. My question is, what is the best way to do this type of thing (query based on an interpolated quantity, estimated position)? I am sure that the GIS types in SQL Server 2008 will help but will they be able to do this? |
![]() |
| Thread Tools | |
| Display Modes | |
| |