[postgis-devel] Fixed crash on Centroid('GEOMETRYCOLLECTION EMPTY')

strk at refractions.net strk at refractions.net
Thu Dec 30 12:33:01 PST 2004


Ok. I've made Centroid(EMPTY) return NULL, it still seems to be
the right thing.
--strk;

On Thu, Dec 30, 2004 at 06:30:26PM +0100, strk at refractions.net wrote:
> Oops... sorry, it was Centroid(), not getBoundary.
> Boundary(GEOMETRYCOLLECTION) actually throws an IllegalArgumentException.
> It is intended to return a point, but can't on EMPTY geom.
> 
> --strk;
> 
> On Thu, Dec 30, 2004 at 12:13:58PM -0500, Carl Anderson wrote:
> > strk at refractions.net wrote:
> > 
> > >I've fixed a GEOS bug crashing on EMPTYGEOM->getBoundary().
> > >In postgis, I've handled this situation returning again an
> > >EMPTY GEOMETRY.
> > >Do you think NULL is more appropriate?.
> > >
> > > 
> > >
> > if getBoundary() is supposed to return a Geometry with a lesser dimension
> > then dimension 0 - 1 =  -1   ... not valid   so it would be a NULL.
> > 
> > C.
> > 
> > >--strk;
> > >
> > >For standing up against patentability of software,
> > >
> > > Thank You, Poland!
> > >
> > >Read the intervention:    http://kwiki.ffii.org/ConsPolon041221En
> > >Send your thanks:         thankyoupoland.info
> > >Read/do more:		  http://www.noepatents.org/
> > >_______________________________________________
> > >postgis-devel mailing list
> > >postgis-devel at postgis.refractions.net
> > >http://postgis.refractions.net/mailman/listinfo/postgis-devel
> > >
> > >-----------------------------------------------------
> > >This message has been scanned for viruses and
> > >dangerous content for Fulton County by DefendMail, and is
> > >believed to be clean.
> > >
> > > 
> > >
> > 
> > 
> > -- 
> > Carl Anderson
> > GIS Manager Fulton County, Georgia
> > carl.anderson at co.fulton.ga.us
> > 404.730.8026
> > 
> > 
> > -----------------------------------------------------
> > This message has been scanned for viruses and
> > dangerous content for Fulton County by DefendMail, and is
> > believed to be clean.
> > 
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-devel
> 
> -- 
> 
> For standing up against patentability of software,
> 
>   Thank You, Poland!
> 
> Read the intervention:    http://kwiki.ffii.org/ConsPolon041221En
> Send your thanks:         thankyoupoland.info
> Read/do more:		  http://www.noepatents.org/
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel

-- 

For standing up against patentability of software,

  Thank You, Poland!

Read the intervention:    http://kwiki.ffii.org/ConsPolon041221En
Send your thanks:         thankyoupoland.info
Read/do more:		  http://www.noepatents.org/



More information about the postgis-devel mailing list