<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi all,<br>
<br>
I spend some time to convert a MultiPoint geometry to a
circularString then to a LineString (since qgis does not handle
circularstring). I achieved this by extracting all coordinates from
the MultiPoint, then concatenating them into a CircularString and
finally convert it to a Linestring. Here is the sql:<br>
<br>
<small> SELECT
ST_CurveToLine(ST_GeomFromText('CIRCULARSTRING('||left(tsum(ST_X(ST_GeometryN(wkb_geometry,n))||'
'||ST_Y(ST_GeometryN(wkb_geometry,n))||','),-1)||')'),12) AS
wkb_geometry<br>
FROM mytable<br>
CROSS JOIN generate_series(1,100) n <br>
WHERE n <= ST_NumGeometries(wkb_geometry) <br>
GROUP BY id;</small><br>
<br>
where tsum is an aggregate:<br>
<small><br>
CREATE AGGREGATE distribution.tsum ( BASETYPE = text, SFUNC =
textcat, STYPE = text, INITCOND = '' );<br>
<big><br>
I use this sql in a view(ie I have my multipoint table, and my
linestring view).<br>
This apparently works but when I load the layers in qgis I have
a postgis error for the view: ERROR: current transaction is
aborted, connands ignored until end of transaction block.<br>
<br>
So, here are my two questions:<br>
1. Does someone know why I have an error in qgis?<br>
2. Does someone have a smarter/better idea to create a curved
linestring from a multipoint?<br>
<br>
The whole SQL code to create table and view is here </big></small>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<big><a
href="https://github.com/3nids/qWat/blob/a281ccaccfb0e246d9753f075b1a85f46c4a4eea/sql/dimension.sql">https://github.com/3nids/qWat/blob/a281ccaccfb0e246d9753f075b1a85f46c4a4eea/sql/dimension.sql</a><br>
<br>
Thanks a lot!!!<br>
<br>
Denis<br>
<br>
<br>
<br>
<br>
<br>
</big><br>
</body>
</html>