Moving a Point along a Path in SQL Server 2008

Posted by David Pfeffer on Stack Overflow See other posts from Stack Overflow or by David Pfeffer
Published on 2010-01-19T14:49:24Z Indexed on 2010/03/28 17:33 UTC
Read the original article Hit count: 281

I have a geography field stored in my database, holding a linestring path.

I want to move a point n meters along this linestring, and return the destination.

For example, I want the destination point 500 meters along the linestring starting from its beginning.

Here's an example -- what is the YourFunctionHere? Or, is there another way?

DECLARE @g geography;
SET @g = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656, -122.310 47.690)', 4326);
SELECT @g.YourFunctionHere(100).ToString();

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server