[postgis-users] GEOS breaks following multi(geomunion())

Michael Choy mkchoy at stanford.edu
Tue Aug 10 12:31:35 PDT 2004


Setup:
Power Mac G5 dual 2.0 GHz
Mac OS X Server 10.3.5
Postgresql 7.4.3
Postgis 0.8.2
GEOS 1.0.0
All compiled with GCC 3.4.1

I have a script that repeated calls multi(geomunion()) that essentially 
aggregates adjacent polygons. It runs fine on a Linux box with 
Postgresql 7.4, Postgis 0.8.2 and GEOS 1.0.0, and I am now trying to 
migrate to a Mac. On the Mac, it runs briefly, aggregating about 3 
pairs, then hangs. Running ps reveals:

14973 std  R     15:33.08 postgres: mkchoy bayarea ::1 SELECT

But nothing is happening. I checked my GEOS install with the following:

bayarea=# select intersection('POINT(1 1)','POINT(1 1)');    
intersection
--------------------
  SRID=-1;POINT(1 1)
(1 row)

Looks good. So I try isolating the line I think is causing the problems:

bayarea=# select a.stfid, multi(geomunion(a.the_geom, b.the_geom)) from 
tr90 a, tr90 b where distance (a.the_geom, b.the_geom) = 0;
NOTICE:  IllegalArgumentException: LinearRing not closed
NOTICE:  IllegalArgumentException: geometries must not contain null 
elements
ERROR:  Couldnt convert the postgis geometry to GEOS!

Not good. But the really weird part is that when you repeat the GEOS 
test, you get this:

bayarea=# select intersection('POINT(1 1)','POINT(1 1)');
NOTICE:  AssertionFailedException: Should never reach here: Unknown 
Precision Model type encountered
ERROR:  GEOS Intersection() threw an error!
bayarea=#

The postmaster then no longer responds to an ordinary shutdown request, 
and I have to kill -9 the process. Once restarted though, the GEOS test 
is successful.

Any insight into my problems would be greatly appreciated. My hunch is 
that it has something to do with the way Postgis and/or GEOS were 
compiled, as I had to install and use GCC 3.4.1 (GCC 3.3 is standard 
with OS 10.3, but it cannot compile Postgis 0.8.2.).

--
Michael Choy
Division of Epidemiology
Stanford University School of Medicine
mkchoy at stanford.edu




More information about the postgis-users mailing list