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

Paul Ramsey pramsey at opengeo.org
Fri Apr 3 21:44:10 PDT 2009


Ticket this with a 1.4 milestone, you're right it should be fixed: we
should just return a correct answer.

P

On Fri, Apr 3, 2009 at 8:38 PM, Paragon Corporation <lr at pcorp.us> wrote:
> 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
>
>
>
>
>
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>



More information about the postgis-devel mailing list