[postgis-users] snapToGrid strange behaviour

Kevin Neufeld kneufeld at refractions.net
Thu Feb 2 20:27:20 PST 2006


Sandro,
The fix seems to work good. Thanx for your hard work!!

Cheers,
Kevin

----- Original Message -----
From: <strk at refractions.net>
To: "Kevin Neufeld" <kneufeld at refractions.net>
Cc: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>;
"Paul Ramsey" <pramsey at refractions.net>
Sent: Sunday, January 29, 2006 6:57 AM
Subject: Re: [postgis-users] snapToGrid strange behaviour


> Kevin, I found the bug to be in the computation of
> the bounding box of SnapToGrid result.
> The fix is in CVS head.
>
> Note that if you ever stored results from SnapToGrid
> back to the database you'll need to force bbox
> recomputations in order to fix it. This is done
> using:
> UPDATE ... SET the_geom=addBbox(dropBbox(the_geom))  ...
>
> You can find a new regress test in CVS head to check this
> (snaptogrid.sql, snaptogrid_expected).
>
> Let me know if you still have problems.
> Thanks.
>
> --strk;
>
>
> On Thu, Jan 26, 2006 at 02:25:58PM -0800, Kevin Neufeld wrote:
> > Can somebody please explain why we are getting these results?
> >
> >
> > test=# select snaptogrid(the_geom, 0.001) ~= the_geom from tmp1;
> > ?column?
> > ----------
> > f
> > (1 row)
> >
> > test=# update tmp1 set the_geom = snaptogrid(the_geom, 0.001);
> > UPDATE 1
> > test=# select snaptogrid(the_geom, 0.001) ~= the_geom from tmp1;
> > ?column?
> > ----------
> > f
>




More information about the postgis-users mailing list