[postgis-users] Problem with LWGEOM_collect_garray - never returns MultiX from MultiX?

Paul Ramsey pramsey at cleverelephant.ca
Fri Oct 10 16:16:34 PDT 2008


OK, I agree, the comment header and the behavior differ... I'm a bit
afraid to change this behavior though... it's a bit long-standing now.
I wonder if doing so would cause and serious problems for people.

P.

On Wed, Feb 6, 2008 at 5:31 AM, Marcus Jenkins <mgwjenkins at gmail.com> wrote:
> Dare I say it, but I think there's a bug in lwgeom_functions_basic.c
> in the LWGEOM_collect_garray function.  According to the docs /
> comments, this should return a multiX if all the objects are multiX,
> but the code on line 2112 (and around) appears to stop that happening.
>
>
>                /* Output type not initialized */
>                if ( ! outtype ) {
>                        /* Input is single, make multi */
>                        if ( intype < 4 ) outtype = intype+3;
>                        /* Input is multi, make collection */
>                        else outtype = COLLECTIONTYPE;
>                }
>
> Or, in pseudo-code, if the input object is a multiX or collection, the
> output will be a GOEMETRYCOLLECTION.  Always.  This ain't what it says
> in the function header.
>
>  * returned geometry is the simplest possible, based on the types
>  * of the collected objects
>  * ie. if all are of either X or multiX, then a multiX is returned
>
> I tried logging the bug on the PHP bug tracker, but I think I need to
> be a different class of user since I'm asked to log in (when I'm
> already logged in) to post a bug report.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list