[postgis-devel] ST_Distance, ST_Dwithin possible breaking change in 1.4

Paragon Corporation lr at pcorp.us
Fri Apr 3 20:38:51 PDT 2009


I noticed we made a somewhat fundamental correct change that when
ST_Distance comes across a Geometry collection it throws an error "geometry
collection not supported"

Before it would just incorrectly return 0 I think.  I wouldn't be so
bothered about this code except I have some applications that do an
intersection and then a distance against some other geometry.  Sometimes
that intersection results in a geometry collection.  I fear if I put 1.4
into production, it will break my somewhat flawed code and there are a lot
of places I need to check this logic.

We should probably at least note this in the release notes that it's a
possibly breaking change or  

1) Alternatively we can just return NULL.  Though NULL has its problems as
well and is not that satisfying either, but would at least allow queries to
run to completion so  bit less breaking.  

2)  if its not much trouble we could just fix it to work with geometry
collections.
3) Just have it return 0 when it hits a geometry collection as it did
before.  If no one notices it was broken before, no one will notice when we
don't fix it, but they may notice when we have it throw a correct error.

Thanks,
Regina










More information about the postgis-devel mailing list