[postgis-devel] Recheck on Points broken

Regina Obe lr at pcorp.us
Mon Jan 2 21:53:59 PST 2017


I know this is a long thread:

https://trac.osgeo.org/postgis/ticket/3418#comment:9

So I'll try to summarize.

We've got a problem with Recheck when comparing 2 geometry points.

Presumably the issue is because our index calculation (point / point) is
returning a distance > actual distance which is not allowed by recheck
logic.

I'm assuming this has something to do with our float/float8 whatever calcs
(though I thought we switched to float8 for index (or was that just for
bbox) and index is still based on float4? )

Anyrate if there is nothing that can be done about ensuring index distance
is always less or equal to actual distance, I think the best course of
action is to disable recheck for point geometries (which is what PostgreSQL
code does for their point to point).

I'm not quite sure how to determine that in this code to do that?

http://postgis.net/docs/doxygen/2.4/df/d5e/gserialized__gist__2d_8c_source.h
tml#l01210

1204         {
 1205                 /* In all cases, since we only have keys (boxes) we'll
return */
 1206                 /* the minimum possible distance, which is the
box2df_distance */
 1207                 /* and let the recheck sort things out in the case of
leaves */
 1208                 distance = (double)box2df_distance(entry_box,
&query_box);
 1209 
 1210                 if (GIST_LEAF(entry))
 1211                         *recheck = true;
 1212         }


Thanks,
Regina




More information about the postgis-devel mailing list