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.
Author |
Topic |
wazuba
Starting Member
4 Posts |
Posted - 2009-12-11 : 17:22:27
|
Hi all,I am trying to implement a certain algorithm using SQL server 2008 (Express edition).Basically I want to divide a certain geographical area into 3d cubes and calculate the distance of each cube from all the other cubes.Brute force calculations are not feasable (at least what I have tried)So I want to divide my space into 9 cubes and then each cube into 9 more cubes in a sort of divide and conquer style. while any cubes that are more than a certain distance apart I don't want to even calculate thier distances.The coordinates of each cube are X,Y,Z and T (time).X goes from 0 to 10 miles in 0.25mile increments.Y goes from 0 to 10 miles in 0.25mile increments.Z goes from 0 to 4 miles in 0.25mile increments.T goes from 0 to 24 hours in 1 minute incrementsAny ideas on how I should go about doing this in SQL server?Thanks!!edit: moved to correct forum |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
wazuba
Starting Member
4 Posts |
Posted - 2009-12-11 : 19:13:01
|
Umm... They are not very complicated calculations it's just euclidean distances.And I need it to be an SQL database of the cubes in the end.Do you think sending a query to the DB through a C# app for example would be better?Won't the queries take longer? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
wazuba
Starting Member
4 Posts |
Posted - 2009-12-12 : 04:48:20
|
I am using SQL 2008....I posted in the wrong forum... |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|