[postgis-devel] Boxes cache and type (was: Caching Double-based Boxes)

Nicklas Avén nicklas.aven at jordogskog.no
Fri Nov 25 04:45:31 PST 2011


On Fri, 2011-11-25 at 11:54 +0000, Mateusz Łoskot wrote:
> On 25 November 2011 09:38, Nicklas Avén <nicklas.aven at jordogskog.no> wrote:
> > In my example I posted in last post, the difference is 0.3 meters! It is
> > no microunits we are talking about.
> >
> > The result is also that the ordering is wrong. You don't get the nearest
> > point when you expect it.
> 
> AFAIU, if error tolerance at 5-th or 6th d.p is enough,
> float may be sufficient, but if tolerance is expected at further
> positions (e.g. 10th)
> double is required. The 6th d.p. of degree is rounds to 10cm, so float may
> be inadequate and leading to the issues as you have discovered.
> 
> Best regards,


the issue is about the same on meter-based projections.

the first point here is where I live in UTM33, the second is 0.49 meters
away and the <-> says the difference is 0

SELECT 'POINT(327220.0 6726245.0 )'::geometry  <-> 'POINT(327220.0
6726245.49)'::geometry 


ops, I said no more noise, sorry

/Nicklas




More information about the postgis-devel mailing list