[postgis-users] Problem with slow GeomUnion (geom, geom)
Matt Doughty
matt.doughty at geograma.com
Mon Jun 4 02:48:29 PDT 2007
Hi,
I managed to union the two tables through a simple union in the end:
CREATE TABLE newtable AS
SELECT
Table1.name,
Table1.the_geom
FROM
Table1
UNION
SELECT
Table2.name,
Table2.the_geom
FROM
Table2;
This didn't quite work as I wanted, as you can only set it to output the attributes of one of the tables, but serves its purpose for now.
I don't think the Intersection(geometry,geometry) would've been relevant as this leaves only the geometries of the polygons where they overlap (or intersect).
Thanks for you inputs,
Matt
Matt Doughty
GEOGRAMA S.L.
Tel.: +34 945 13 13 72 652 77 14 15
Fax: +34 945 23 03 40
www.geograma.com
-----Mensaje original-----
De: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] En nombre de Håvard Tveite
Enviado el: viernes, 01 de junio de 2007 16:17
Para: PostGIS Users Discussion
Asunto: Re: [postgis-users] Problem with slow GeomUnion (geom, geom)
This is probably a map overlay, and not a traditional spatial join.
See:
<URL: http://en.wikipedia.org/wiki/Geographic_information_system#Map_overlay >
The PostGIS Intersection(geometry,geometry) is a relevant
operation.
Håvard
Mark Cave-Ayland wrote:
> On Fri, 2007-06-01 at 12:00 +0200, Matt Doughty wrote:
>> Hi Mark,
>>
>> I'm trying to do a geometric union (I'm more used to doing these things
>> in ArcGIS where it'd be a union: A topological overlay of two or more
>> polygon spatial datasets that preserves the features that fall within
>> the spatial extent of either input dataset; that is, all features from
>> both datasets are retained and extracted into a new polygon dataset
>> (ESRI website))
>>
>> In this case I'm not bothered about what happens to attributes, it's the
>> polygons that I want.
>>
>> The input tables are as follows:
>>
>> 1. Table1
>> name character varying(70),
>> the_geom geometry
>> 2. Table 2
>> name character varying(70),
>> the_geom geometry
>> Cheers,
>>
>> Matt
>
> Okay, this is getting a little out of my comfort zone so someone else
> may need to help out here - is basically what you want to return all the
> polygons that overlap each other from your two tables?
>
>
> Kind regards,
>
> Mark.
>
> --
> ILande - Open Source Consultancy
> http://www.ilande.co.uk
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
--
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list