I've got a table with lat/longs for specific points:
CREATE TABLE [Point] (
[PointID] [int],
[Lat] [numeric](10, 6),
[Lon] [numeric](10, 6)
)
I have another table with polygon borders as lat/longs:
CREATE TABLE [Polygon] (
[PolygonID] [int],
[PointNum] [int],
[Lat] [numeric](10, 6),
[Lon] [numeric](10, 6)
)
What I need to do, is come up with a script that will determine which Polygon contains each point. I'd like to be able to assign a PolygonID to each record in the Point table, or give it a 0 if there is no polygon that contains that point.
I'm looking for a way to do this within SQL Server (or possibly with the use of an extended stored procedure if necessary).
Thanks for your help and suggestions!
TylerIf anyone has an interest in this, I suggest you have a look here:
http://www.sqljunkies.com/Forums/ShowPost.aspx?PostID=8833
Discussions are on-going and I've found a solution that is working... so far... :)sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment