I have a relate(geometry, geometry) function in PostGIS now. It passes the 555 tests I previously sent out. Its a bit slow because of the PostGIS Geometry -> WKT -> WKT Reader -> GEOS geometry. I havent looked at any memory management issues... dave