Hi Jon,
Are you aware of this for Delphi?
http://www.tatukgis.com/products/Dk/kernel.aspx
The operations we need (buffers, intersections) could also be accomplished by calling out to the open source library GDAL/OGR. The problems, as I see it, is that Recorder/SQL Server does not have the framework, as yet, to handle the storage of GIS features. AFASIK, SQL Server would have to have the spatial extension add on (I think it quite expensive to purchase) and I guess this would not be available to MSDE users.
To help further it would be interesting to know how Recorder implements the point in polygon test you mention above in the report wizard. I'm a bit confused as I was sure Recorder already had a Delphi spatial library, but not having access to Recorder 6 until last week, I dont know what's what.
There are a number of techniques we could use to include point features which are in the SW corner of a square at some determinate distance from a polygon feature. One is to extend the bounding box of the polygon to capture any points which may be in the region of interest. For 10km resolution points make the bounding box at least 15km in each direction. This is a fast spatial operation.
For those points captured with a resolution of e.g. 10km add 5km to each axis to move it into the center of the square. For each of these features generate a bounding box of 10km. Run another spatial test to see if any of these bounding boxes touch/intersects with the polygon and factor out as required. This is a slower operation and without spatial indexes (e.g. GIST) could be quite (nay very) slow for large data.
At this point can I just sink my head in my hands and say I wish were using Postgresql with PostGIS - but that would not be very helpful to the problem at hand would it :)
Kind Regards,
Dave Cope,
Biodiversity Technology Officer,
Biodiversity Information Service for Powys and Brecon Beacons National Park.