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

Brent Wood pcreso at pcreso.com
Fri Oct 10 18:17:15 PDT 2008


Hi guys,

I prefer the intent than the current result, multi types are much easier to work with than collections, and in principle, I suggest PostGIS should always try to return geometries of the simplest types which encompass the result set.

So at least in my case, changing it would not cause any problems.


Thanks,

   Brent Wood


--- On Sat, 10/11/08, Paul Ramsey <pramsey at cleverelephant.ca> wrote:

> From: Paul Ramsey <pramsey at cleverelephant.ca>
> Subject: Re: [postgis-users] Problem with LWGEOM_collect_garray - never returns MultiX from MultiX?
> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Cc: mgwjenkins at gmail.com
> Date: Saturday, October 11, 2008, 12:16 PM
> 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
> >
> _______________________________________________
> 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