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

Can anyone provide an example SQL for smoothing linestrings from postgis table using Bezier curves or Iterative Averaging (SIA) algorithm?

share|improve this question

This is still an open issue in PostGIS (and other GIS tools) as stated in the book "PostGIS in Action" in chapter 2.2.6 "Curved geometries".

Here are some references to algorithms and code:

share|improve this answer
I added the postgis.17.x6... links – Martin F Oct 29 '13 at 22:09

You can try to convert your linestrings to curves with ST_LineToCurve and then back to linestrings with ST_CurveToLine.

You can set the number of segments per quarter circle you want in ST_CurveToLine.

share|improve this answer
LineToCurve is built to handing the outputs of CurveToLine, not to extract curves from arbitrary input. – Paul Ramsey Sep 3 '13 at 19:31
@PaulRamsey would bezier smoothing be added in next Postgis versions? I've been thinking on something like this for instance:… – Gery Jan 2 '14 at 10:17

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.