Thanks! I guess having a zero area bounding box would be an illegal geometry.
> -----Original Message----- > From: [email protected] > [mailto:[email protected]] On > Behalf Of Kevin Neufeld > Sent: Wednesday, October 07, 2009 11:19 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] Merge lines > > > Sufficool, Stanley wrote: > > How would the bounding box on a point be a problem with > group by? I am > > aware of the classic example of a line 0,0-5,5 and 0,5-5,0 being > > treated as same when grouped. But does this really apply to points? > > Unfortunately, yes. Consider these two close points that > have the same bounding box: > > SELECT column1::box2d > FROM (VALUES > ('POINT(0.123456789 0.123456789)'::geometry), > ('POINT(0.123456788 0.123456788)'::geometry)) AS foo; > > column1 > -------------------------------------------------------------- > ---------------- > BOX(0.123456783592701 0.123456783592701,0.123456791043282 > 0.123456791043282) > BOX(0.123456783592701 0.123456783592701,0.123456791043282 > 0.123456791043282) (2 rows) > > So, using a group by on the bounding box will treat these two > points will group them together, just like your linear > example above. > > If your dataset is of significant precision, grouping by the > hex string of the point works well. > > Cheers, > Kevin > > _______________________________________________ > postgis-users mailing list [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
