Hi,
I've been investigating using MsSqlSpatial to store large numbers of polygons (series of longitudes/latitudes) and then locating which of these polygons a particular point lies. I've managed to get things working nicely in simple cases, but as the number
of points in the polygon grows, the polygon construction quickly slows to a halt.
I am constructing polygons using something like:
ST.PolygonFromText('POLYGON((' + @points + '))',4369) where points is a string constucted from longs and lats stored in some table. With sufficiently large point datasets, this dies.
To find if a point lies within this I'm using:
SELECT [ST].[Contains] (ST.PolygonFromText('POLYGON((' + @points + '))',4369), ST.PointFromText('POINT(long,lat)',4369))
Again, works just fine until we hit a large dataset, where the polygon isn't even created.
My question: Are there more efficient ways to build up polygons for querying?
Any advice is much appreciated!
