[postgis-users] How does makeline work?
Mark Cave-Ayland
m.cave-ayland at webbased.co.uk
Fri Sep 9 01:20:12 PDT 2005
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On
> Behalf Of Guido Lemoine
> Sent: 09 September 2005 08:57
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] How does makeline work?
>
>
> Mark,
>
> Thanks for the clarification.
>
> I tried your suggestion, already as part of my original tests. Your
> version gives
> a syntax error at the inner select statement inside makeline.
> If I add
> extra brackets
> to make it an expression, it returns the following error.
>
> select astext(makeline((select gcp_geom from testset order by
> gcp_id)))
> from testset;
> ERROR: more than one row returned by a subquery used as an expression
>
> I didn't report this one, because I thought it was logical (similar
> error for other aggregate
> functions). But now I am not so sure.
>
> Guido
Hi Guido,
Sorry, I made a mistake when reading the documentation :) I've had a play on
a real database and the following should work better:
select astext(makeline(foo.gcp_geom)) from (select gcp_geom from testset
order by gcp_id) AS foo;
select astext(makeline(foo.gcp_geom)) from (select gcp_geom from testset
order by gcp_id desc) AS foo;
Kind regards,
Mark.
------------------------
WebBased Ltd
17 Research Way
Tamar Science Park
Plymouth
PL6 8BT
T: +44 (0)1752 797131
F: +44 (0)1752 791023
W: http://www.webbased.co.uk
More information about the postgis-users
mailing list