<div dir="ltr"><div style="line-height:1.35" class="csl-bib-body">
  <div class="csl-entry">Hello,<br></div><div class="csl-entry">I don't know if you have a clear theoretical idea of what you want to do.<br><br></div><div class="csl-entry">If you work on roads, maybe you don't want to make them "smooth" but make them usable by realistic cars (ie no sharp turn, no turn with a radius minus than XX meters, so on...).<br>
<br></div><div class="csl-entry">For instance, you could use "coupoundCurve" (ie a mixture of line and curve) to represent your road, as in this paper (see page 9):<br></div><div class="csl-entry">The fitting process is page 10 and straightforward, you could use pure postgis - pl/pgsql.<br>
</div><div class="csl-entry"><br>Wilkie D., Sewall J., Lin M. C., Lin M. C. « Transforming GIS Data into Functional Road Models for Large-Scale Traffic Simulation ». <i>IEEE Transactions on Visualization and Computer Graphics</i> [En ligne]. 2012. Disponible sur : < <a href="http://dx.doi.org/10.1109/TVCG.2011.116">http://dx.doi.org/10.1109/TVCG.2011.116</a> ></div>

  <span class="Z3988" title="url_ver=Z39.88-2004&ctx_ver=Z39.88-2004&rfr_id=info%3Asid%2Fzotero.org%3A2&rft_id=info%3Adoi%2F10.1109%2FTVCG.2011.116&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Transforming%20GIS%20Data%20into%20Functional%20Road%20Models%20for%20Large-Scale%20Traffic%20Simulation&rft.jtitle=IEEE%20Transactions%20on%20Visualization%20and%20Computer%20Graphics&rft.aufirst=David&rft.aulast=Wilkie&rft.au=David%20Wilkie&rft.au=Jason%20Sewall&rft.au=Ming%20C.%20Lin&rft.au=Ming%20C.%20Lin&rft.date=2012&rft.issn=1077-2626"></span><br>
<br></div><div style="line-height:1.35" class="csl-bib-body">I'm guessing that depending on the target volume/processing time/result complexity , <br></div><div style="line-height:1.35" class="csl-bib-body">you can either solve the problem with "mathematical" processing or with an heuristic<br>
<br></div><div style="line-height:1.35" class="csl-bib-body">With "mathematical" processing you will consider your linestring as a multi-segment line, and fit to it a splin/polygon/clothoid/whatever. This would be easier with PL/R, as the fitting can become complex depending on the criteria (C1, radius, etc).<br>
<br></div><div style="line-height:1.35" class="csl-bib-body">with heuristic you will look for places where angles are too sharp and then correct it using local tricks/postgis curves. This would be easier with Pl/pgsql<br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,<br>Rémi-C <br></div><div class="gmail_extra"><br></div></div>