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

Nicklas Avén nicklas.aven at jordogskog.no
Fri Nov 25 03:37:42 PST 2011


> Is 0.3 meters important when looking for nearest point ?
> What's the use case ? Find closest glasses to a bottle on
> the table in an appartment of a City ?

I realize that 0.3 meters not is very much and in 99% of all use cases
storing geometries in integers would be much more wise.
I also realize that it not is a big issue. 

0.3 meters is not interesting to compare to the size of the geometries
but to the likely difference in distance to different geometries. 

But what I find ugly is if you query for the closest house to a lake and
you get one answer if you query with knn and another answer if quering
with st_distance or postgresql native. 

The use case when this will happen is if you have a huge amount of
points and wants to find the closest. Then it is likely that the two
closest might be at similar distance and you will get different results.

But I am not going to make more noise about it. I can live with it (I
have no use cases at all since I don't get the chance to work with
PostGIS at work so it is actually not a problem to me. But I hope things
will change)

BTW, I think there is at least a few tickets we can close if we don't
see 0.3 meters error as a problem. It is not meant to be sarcastic just
that maybe we should find a level of accuracy that is acceptable. And
then adjust the output type from our functions to that accuracy.
Returning double precision from distance functions and so on is then not
very functional.


/Nicklas




More information about the postgis-devel mailing list