I ran a st_isvalid on all features of my table. I had 4 invalid features. deleted em, everything worked.<br><br>But how about transforming that linestring, into lines?<br><br>Example, i have a square, and i need to have all four lines that compose it into separate records.<br>
<br>Is that possible?<br><br>George<br><br><div class="gmail_quote">On Fri, Jun 26, 2009 at 11:41 PM, Kevin Neufeld <span dir="ltr"><<a href="mailto:kneufeld@refractions.net">kneufeld@refractions.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I'm not sure exactly what you are trying to do, but yes, ST_Boundary does extract linework (aka. the boundary) from a polygon.<br>

<br>
SELECT ST_AsText(ST_Boundary('POLYGON((0 0, 1 1, 1 0, 0 0))'::geometry));<br>
         st_astext         -----------------------------<br>
LINESTRING(0 0,1 1,1 0,0 0)<br>
(1 row)<br>
<br>
Can you isolate the geometry that is causing you grief?<br>
-- Kevin<br>
<br>
<br>
George Silva wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hello everyone.<br>
<br>
I'm trying to build a function that will transforma one polygon into many lines. I have a lot table, and i would like to insert each line from each lot in a table, containing the id of the lot.<br>
<br>
I've tried: SELECT gid, St_boundary(the_geom) INTO lines from lots and postgis gave me an error:<br>
<br>
*NOTICE:  IllegalArgumentException: Number of points must be 0 or >3<br>
ERROR:  POSTGIS2GEOS conversion failed<br>
<br>
********** Erro **********<br>
<br>
ERROR: POSTGIS2GEOS conversion failed<br>
SQL state: XX000*<br>
<br>
I'm wondering if that is the right approach? I'm not even sure if boundary is what i am looking for. Can anyone help me? Why postgis gave me this error?<br>
<br>
Thanks in advanced.<br>
<br>
George<br>
<br>
<br>
-- <br>
George R. C. Silva<br>
Sigma Consultoria<br>
<br>
Desenvolvimento em GIS<br>
</div></div><a href="http://www.consultoriasigma.com.br" target="_blank">www.consultoriasigma.com.br</a> <<a href="http://www.consultoriasigma.com.br" target="_blank">http://www.consultoriasigma.com.br</a>><br>
<a href="http://www.sigmaconsultoria.blogspot.com" target="_blank">www.sigmaconsultoria.blogspot.com</a> <<a href="http://www.sigmaconsultoria.blogspot.com" target="_blank">http://www.sigmaconsultoria.blogspot.com</a>><br>

------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
  <br>
</blockquote>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>George R. C. Silva<br>Sigma Consultoria<br><br>Desenvolvimento em GIS<br><a href="http://www.consultoriasigma.com.br">www.consultoriasigma.com.br</a><br><a href="http://www.sigmaconsultoria.blogspot.com">www.sigmaconsultoria.blogspot.com</a><br>