I've just published a new project on CodePlex: SQL Server Spatial Tools. The core idea is that instead of pushing up more samples showing how to extend our spatial functionality in text, we can put them in a more usable form. Beyond just showing off some samples, though, we'd like to assemble useful code into a toolkit that provides some real functionality over what we bake into the server.
Here's what's in the package so far:
- ShiftGeometry: Takes a geometry instance and shifts if by a given X and Y amount.
- InterpolateBetweenGeom: Takes start and end geometry points and returns a new point that is a given distance from the start toward the end.
- InterpolateBetweenGeog: Takes start and end geography points and returns a new point that is a given distance from the start toward the end.
- LocateAlongGeom: Takes a geometry linestring and finds the point a given distance along it.
- LocateAlongGeog: Takes a geography linestring and finds the point a given distance along it.
So far we haven't pushed up an actual build, but you can get the source and put it together yourself. We'll be working to clean this up over time. Oh, and everything is published under the Microsoft Public License, so you can have fun playing with it all you like.
If you're interested in adding to the package, let us know---we're happy to have you.