Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For Example I have simple linestring 'LINESTRING(25 50, 100 125, 150 190)' and I need to divide it to segments of length 10. In postgis i know there is a function ST_Segmentize but what about MS SQL Server?

share|improve this question
up vote 3 down vote accepted

You are after the SQL Server Spatial Tools extras for SQL Server 2008. Find them and the descriptions at

Be aware that after you install, you have to trust the assembly as well.

Once you have these installed, then it given you a few more options. One of which is to LocateAlongGeom, which will give you a point a given distance in whatever the units are of the geometry along the line.

select dbo.LocateAlongGeom(geometry::STGeomFromText('LINESTRING(25 50, 100 125, 150 190)',0),10)

share|improve this answer
thank you and I forgot to ask whether it will be capable of ms sql server express 2008? – HacketyHack Mar 6 '12 at 5:56
Yes you can use it in SQL SERVER 2008 Express, I just checked my local install and it works fine. – Kelso Mar 6 '12 at 6:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.