[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] Combined MULTIPOLYGON from subselect on column
From:       Ben Jubb <benjubb () refractions ! net>
Date:       2008-01-28 16:59:16
Message-ID: 479E09E4.6040407 () refractions ! net
[Download RAW message or body]

Hi,
Did you try using the aggregate ST_Union to merge your geometries?

b

Marcus Jenkins wrote:
> Hi
>
> I'm trying to make a (new, larger) multipolygon from a number of rows
> that are selected using an aggregate function ST_Collect.  The problem
> is that the ST_Collect creates a geometrycollection which I can't work
> out how to merge into a new multipolygon, even though the source
> column only contained multipolygon.  I've RTFM a few times...
> ...help?!
>
> My current insert statement looks something like this - I get no
> error, but the output is null in the output column.
>
> insert into my_output_table (id, the_geom, debug_text) select s.id,
> ST_MPolyFromText(ST_AsText(ST_Collect(s.the_geom))),
> ST_AsText(ST_Collect(s.the_geom)) from my_source_table s group by id;
>
> The debug_text column gets filled with lots of nice WKT of
> GEOMETRYCOLLECTION, but we kind of expected that already ;-)
>
> Any clues greatly appreciated.  Otherwise I will be forced to do
> something horrible in Perl like do the select, dismember each
> MULTIPOLYGON record in the source table grouped as per the  select
> above and then craft WKT to make an insert statement to populate my
> output table.  /Surely/ I don't have to resort to this kludgery?
>
> Regards
>
> Marcus
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>   

["benjubb.vcf" (text/x-vcard)]

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic