[postgis-users] create a single multilinestring field from a column of linestring
nicolas.ribot at gmail.com
Mon Nov 26 09:15:01 PST 2012
By grouping by ID, you ask to generate as many rows as there are distinct
ids in the table.
You could add a surrounding query collecting the grouped linestring to get
only one row:
SELECT ST_Multi(ST_Collect(geom_way)) as singlegeom
group by id
On 26 November 2012 16:56, Raffaello Bertini <raffaellobertini at gmail.com>wrote:
> Hi there,
> I need to create a field multilinestring / linestring, where the values
> are taken from a column of linestring
> I need a result that consist in only one row and one col.
> here my snipett sql:
> SELECT ST_AsText(ST_Multi(ST_Collect(geom_way))) as singlegeom
> FROM emily_route
> group by id
> but there are many rows as the table itself. and i don't know even if the
> 'singlegeom' is the
> "array of the all the geometry in the emili_route table".
> If i remove the group by the results is an empty table 1x1 (only the table
> dimension is right:))
> any helps please?
> postgis-users mailing list
> postgis-users at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users