Brent Wood | 1 Mar 2005 02:17

help with SQL/geomunion useage/combining polygons


I have a table with polygon, and other attributes including date and a number
representing sea ice cover (ct value).

(I plan to use this with PostGIS & with Quantum GIS, the sql in the script
below to create the entry in the geometry_columns table is to allow QGIS to
plot the view)

What I'd like to do is generate a new table (or view) which has touching
polygons merged (combined) by date & ct, eg: for a given date, give me the
merged polygons representing all ice areas with a ct between 1 and 35.

I have tried a few versions of the script below. While it does work as far as
it goes, I'm still getting contiguous polygons in the output. My hope was that
GeomUnion would dissolve the shared boundries of contiguous polygons, however
it does not seem to do this.

Ideally a function like "envelope", but returning the outer perimeter, not the
bounding box.

Any suggestions as to how this can be done in POstGIS appreciated....

  Brent Wood

#!/bin/bash
# test script to create ice geomunions
#
# B Wood March 2005

DB=antarctic
(Continue reading)

TECHER Jean David | 1 Mar 2005 14:25
Picon
Favicon

PostGIS Windows Binaries RC3 available

Hi All
 
Since last wednesday the binary windows for postgis rc3/geos 2.1.1:proj 4.4.9
is available at
 
 
Have fun !!!
----------------------------------------------------------------
TECHER Jean David
Responsable Informatique 01MAP
e-mail: davidtecher <at> yahoo.fr
Bureau: 04 67 45 60 27
Portable: 06 85 37 36 75
site perso : http://techer.pascal.free.fr/postgis/
site pro: http://www.01map.com/download/
K-S:"The greatest trick the devil pulled off was convincing people he didn't exist"
------------------------------------------------------------
_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
roxana | 1 Mar 2005 14:56
Picon

GeomUnion and Intersection

Hello,
I'm getting something further with my worldmap database. I have the esri
shapefile of Europe in it, now I'm trying to get data and visualize it. I'm
using the gml output, and that's going fine. 
The idea is to get all borders and coastlines, I want to have as less as
possible points. The queries I'm using are like this:

for the coastlines:

SELECT AsGML(simplify(GeomUnion((SELECT the_geom FROM worldmap WHERE cntry_name
='France'),GeomUnion((SELECT the_geom FROM worldmap WHERE cntry_name
='Netherlands'),(SELECT the_geom FROM worldmap WHERE cntry_name
='Belgium'))),0.05));

and for each pair of countries:

SELECT AsGML(simplify(Intersection((SELECT the_geom FROM worldmap WHERE
cntry_name ='France'),(SELECT the_geom FROM worldmap WHERE cntry_name
='Belgium')),0.05));

Is there another way to do this?. Specially for the first query: i saw you can
also use it with "geometry set" but I couldn't find what that is.

Thanks,
roxana

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
strk | 1 Mar 2005 15:01
Favicon

Re: GeomUnion and Intersection

This should give you the simplified coastline:

SELECT AsGML(simplify(geomunion(the_geom), .05)) FROM worldmap;

--strk;

On Tue, Mar 01, 2005 at 02:56:32PM +0100, roxana <at> torre.nl wrote:
> Hello,
> I'm getting something further with my worldmap database. I have the esri
> shapefile of Europe in it, now I'm trying to get data and visualize it. I'm
> using the gml output, and that's going fine. 
> The idea is to get all borders and coastlines, I want to have as less as
> possible points. The queries I'm using are like this:
> 
> for the coastlines:
> 
> SELECT AsGML(simplify(GeomUnion((SELECT the_geom FROM worldmap WHERE cntry_name
> ='France'),GeomUnion((SELECT the_geom FROM worldmap WHERE cntry_name
> ='Netherlands'),(SELECT the_geom FROM worldmap WHERE cntry_name
> ='Belgium'))),0.05));
> 
> and for each pair of countries:
> 
> SELECT AsGML(simplify(Intersection((SELECT the_geom FROM worldmap WHERE
> cntry_name ='France'),(SELECT the_geom FROM worldmap WHERE cntry_name
> ='Belgium')),0.05));
> 
> Is there another way to do this?. Specially for the first query: i saw you can
> also use it with "geometry set" but I couldn't find what that is.
> 
> Thanks,
> roxana
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users <at> postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
roxana | 1 Mar 2005 16:16
Picon

Re: GeomUnion and Intersection

Thanks!! that works and it's much easier..
roxana

> This should give you the simplified coastline:
> 
> SELECT AsGML(simplify(geomunion(the_geom), .05)) FROM worldmap;
> 
> --strk;
> 
> On Tue, Mar 01, 2005 at 02:56:32PM +0100, roxana <at> torre.nl wrote:
> > Hello,
> > I'm getting something further with my worldmap database. I have the esri
> > shapefile of Europe in it, now I'm trying to get data and visualize it.
> I'm
> > using the gml output, and that's going fine. 
> > The idea is to get all borders and coastlines, I want to have as less as
> > possible points. The queries I'm using are like this:
> > 
> > for the coastlines:
> > 
> > SELECT AsGML(simplify(GeomUnion((SELECT the_geom FROM worldmap WHERE
> cntry_name
> > ='France'),GeomUnion((SELECT the_geom FROM worldmap WHERE cntry_name
> > ='Netherlands'),(SELECT the_geom FROM worldmap WHERE cntry_name
> > ='Belgium'))),0.05));
> > 
> > and for each pair of countries:
> > 
> > SELECT AsGML(simplify(Intersection((SELECT the_geom FROM worldmap WHERE
> > cntry_name ='France'),(SELECT the_geom FROM worldmap WHERE cntry_name
> > ='Belgium')),0.05));
> > 
> > Is there another way to do this?. Specially for the first query: i saw you
> can
> > also use it with "geometry set" but I couldn't find what that is.
> > 
> > Thanks,
> > roxana
> > 
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> > 
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users <at> postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users <at> postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Brent Wood | 1 Mar 2005 17:59

Help needed installing Postgis 1.0 RC3


I'm running A64 Ubuntu linux. I have successfully installed Postgres v8.0.1
from source, as well as proj4.

I can compile & install PostGIS v0.9.1 from the tar.gz file, but not 1.0 RC3

Is this a suitable place to post make output etc to explain the problem, or is
there somewhere where the traffic won't be inflicted on everyone??
 :-)

Brent Wood
Markus Schaber | 1 Mar 2005 18:05

Re: Help needed installing Postgis 1.0 RC3

Hi, Brent,

Brent Wood schrieb:
> I'm running A64 Ubuntu linux. I have successfully installed Postgres v8.0.1
> from source, as well as proj4.
> 
> I can compile & install PostGIS v0.9.1 from the tar.gz file, but not 1.0 RC3
> 
> Is this a suitable place to post make output etc to explain the problem, or is
> there somewhere where the traffic won't be inflicted on everyone??
>  :-)

I'm shure that this list is a good place for discussing such, but maybe
postgis-devel <at> postgis.refractions.net is an alternative.

Markus
--

-- 
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios <at> logi-track.com | www.logi-track.com
Markus Schaber | 1 Mar 2005 18:12

Re: Crasher in rc2

Hi, Rod,

Rod Taylor schrieb:

> FreeBSD 5.3 for AMD64. I used the version located in the ports tree.

Okay. Can you attach a debugger to the backend so we can get a stack trace?

> Upgrading to a newer version at this time is not easily possible, but I
> will do so eventually.

Do you know that you can have several different PostGIS versions
installed in parallel, in different databases, but for the same
Postmaster instance? It should even be possible using different schemas
inside the same database, but I did not test this yet.

Markus
--

-- 
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios <at> logi-track.com | www.logi-track.com
strk | 1 Mar 2005 18:14
Favicon

Re: Crasher in rc2

On Tue, Mar 01, 2005 at 06:12:18PM +0100, Markus Schaber wrote:
> Hi, Rod,
> 
> Rod Taylor schrieb:
> 
> > FreeBSD 5.3 for AMD64. I used the version located in the ports tree.
> 
> Okay. Can you attach a debugger to the backend so we can get a stack trace?
> 
> > Upgrading to a newer version at this time is not easily possible, but I
> > will do so eventually.
> 
> Do you know that you can have several different PostGIS versions
> installed in parallel, in different databases, but for the same
> Postmaster instance? It should even be possible using different schemas
> inside the same database, but I did not test this yet.

Don't try it ;)
You can't do it unless you have different versioned postgis libraries
(which is not the case between minor-version changes)
--strk;

> 
> Markus
> -- 
> markus schaber | dipl. informatiker
> logi-track ag | rennweg 14-16 | ch 8001 zürich
> phone +41-43-888 62 52 | fax +41-43-888 62 53
> mailto:schabios <at> logi-track.com | www.logi-track.com
> _______________________________________________
> postgis-users mailing list
> postgis-users <at> postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
Markus Schaber | 1 Mar 2005 18:17

Re: Crasher in rc2

Hi, strk,

strk <at> refractions.net schrieb:

>>Do you know that you can have several different PostGIS versions
>>installed in parallel, in different databases, but for the same
>>Postmaster instance? It should even be possible using different schemas
>>inside the same database, but I did not test this yet.
> 
> Don't try it ;)
> You can't do it unless you have different versioned postgis libraries
> (which is not the case between minor-version changes)

It should be possible having different directories, as postgresql uses
full qualified file names. But I have to admit that you cannot simply
use "make install" unmodified.

markus

--

-- 
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios <at> logi-track.com | www.logi-track.com

Gmane