<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I partially agree.<br>
    <br>
    If you look in the doc
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a
href="http://postgis.refractions.net/documentation/manual-svn/ST_LineToCurve.html">http://postgis.refractions.net/documentation/manual-svn/ST_LineToCurve.html</a><br>
    It is written that it should convert to circular strings or curved
    polygon.<br>
    <br>
    In case of circular strings, you need at least 3 (and not 4) points
    to determine the circle, as explained in Stephen's link
    <a class="moz-txt-link-freetext" href="http://paulbourke.net/geometry/circlefrom3/">http://paulbourke.net/geometry/circlefrom3/</a><br>
    <br>
    On 02/28/2012 04:32 PM, Paul Ramsey wrote:
    <blockquote
cite="mid:CACowWR2WNexkUKzsHas+ckTHzj+L+0KdPJ3PuNmAO5-tZqSJAQ@mail.gmail.com"
      type="cite">
      <pre wrap="">No. This is a misunderstanding of purposes.

ST_LineToCurve is the inverse of ST_CurveToLine. CurveToLine takes in
a circular object and linearizes it, turning curves into regular small
sections of linear arcs to approximate the input shape.
LineToCurve analyzes an input linestring, looking for the tell-tale
regularity of linearized arcs and converts them back to real arcs. The
process can only work with linestrings that have for or more vertices
to analyze.

What Denis is looking for is probably something more like
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/postgis/ticket/1291">http://trac.osgeo.org/postgis/ticket/1291</a>

P.

On Tue, Feb 28, 2012 at 12:38 AM, Sandro Santilli <a class="moz-txt-link-rfc2396E" href="mailto:strk@keybit.net"><strk@keybit.net></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">On Tue, Feb 28, 2012 at 09:36:34AM +0100, Denis Rouzaud wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Hi,

Can someone tells me why ST_LineToCurve needs at least a linestring
of 4 points to be run?
If I have three points, I should be able to create a circularstring, right?

Here the error I have:
SELECT ST_LineToCurve(ST_GeomFromText('LINESTRING(554803.177682475
145390.853708235,554796.469135702 145401.404724093,554769.634948609
145404.042478058)'));
ERROR:  pta_desegmentize needs implementation for npoints < 4
</pre>
        </blockquote>
        <pre wrap="">
If I read the message correctly it answers exactly your questions.
It "needs implementation". A patch is welcome.

--strk;

 ,------o-.
 |   __/  |    Delivering high quality PostGIS 2.0 !
 |  / 2.0 |    <a class="moz-txt-link-freetext" href="http://strk.keybit.net">http://strk.keybit.net</a> - <a class="moz-txt-link-freetext" href="http://vizzuality.com">http://vizzuality.com</a>
 `-o------'

_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
      </blockquote>
      <pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
    </blockquote>
  </body>
</html>