Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

I want to smooth Lines in postgis, to be more specific, I want to smooth road data from OpenStreetMap.

Basicly I thought of something like this scenario. This would be a possible road segment.

This would be a possible road segment.

enter image description here

I want to use ST_LineInterpolate_Point() to select the middle Points

enter image description here

After this, I want to create New Points between the original ones and the darkgreen helpline. (I have no Idea how to achieve this...)

enter image description here

I read about circularlinestrings. I hope it will be possible to lay one of these over the darkgreen and red points.

enter image description here

Finaly I want to use ST_LineInterpolate_Point() again on the circularlinestring (if this is possible) and create some new points(yellow ones), to make a new normal LineString.

To sum up, I am new to PostGIS, but since I haven't found anything helpful for LineSmoothing I need a function where I can input a LineString and the number of yellow points per segment. The function should return a new LineString.

First of all: Is this possible to achieve with just pl/pgsql?

Second, since I am new to all of this, can somebody give me some advice where to start?

share|improve this question
Maybe this How to Answer[1] could help you. [1]: – juanluisrp Oct 11 '13 at 8:17
would: "st_curvetoline(st_linetocurve(my_line),1000)" also smooth my line? Or is the curve not realy a curve, because its made from a normal linestring? – XyZtobiXyZ Oct 11 '13 at 11:17
@afalciano and juanluisrp, thanks for those answers. They gave me some interesting imput for my task. – XyZtobiXyZ Oct 11 '13 at 11:21

Your Answer


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

Browse other questions tagged or ask your own question.