« Return to Thread: St_boundary and illegal argument exception
SELECT gid, ST_MakeLine(ST_PointN(the_geom, n),ST_PointN(the_geom,n+1)) As geomwkt
FROM (VALUES (1 , ST_GeomFromText('LINESTRING(1 2, 3 4, 5 8, 6 10)') ) ,
(2 , ST_GeomFromText('LINESTRING(1 2, -1 -2)') ))
As foo(gid,the_geom)
CROSS JOIN generate_series(1, 1000) As n
WHERE n < ST_Npoints(foo.the_geom);
I'm not sure exactly what you are trying to do, but yes, ST_Boundary does extract linework (aka. the boundary) from a polygon.
SELECT ST_AsText(ST_Boundary('POLYGON((0 0, 1 1, 1 0, 0 0))'::geometry));
st_astext -----------------------------
LINESTRING(0 0,1 1,1 0,0 0)
(1 row)
Can you isolate the geometry that is causing you grief?
-- Kevin
George Silva wrote:
_______________________________________________www.consultoriasigma.com.br <http://www.consultoriasigma.com.br>Hello everyone.
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.
I've tried: SELECT gid, St_boundary(the_geom) INTO lines from lots and postgis gave me an error:
*NOTICE: IllegalArgumentException: Number of points must be 0 or >3
ERROR: POSTGIS2GEOS conversion failed
********** Erro **********
ERROR: POSTGIS2GEOS conversion failed
SQL state: XX000*
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?
Thanks in advanced.
George
--
George R. C. Silva
Sigma Consultoria
Desenvolvimento em GIS
www.sigmaconsultoria.blogspot.com <http://www.sigmaconsultoria.blogspot.com>
------------------------------------------------------------------------
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users
« Return to Thread: St_boundary and illegal argument exception
| Free embeddable forum powered by Nabble | Forum Help |