[postgis-devel] KNN <#> Operator - odd results

Paul Ramsey pramsey at opengeo.org
Wed Oct 26 15:11:50 PDT 2011


Rather than eyeballing,

select boxes <#> point, st_distance(st_envelope(boxes), point) from
boxes order by boxes <#> point;

so we can see.

On Wed, Oct 26, 2011 at 2:00 PM,  <maplabs at light42.com> wrote:
> Hi All -
>
>   the distances generated by the <#> operator, shown on
>
>       http://download.osgeo.org/postgis/knn_misc/knn_rbox_ansF.png
>
> seemed odd to me.. now I could have made a mistake - but the session is
> transcribed
> so it is repeatable...
>   an informal double-check just now gave me  these *actual* distances
> (in fake pixel units of the screenshot, blown up twice)
>
>   distance order             pixel distance     should-be order
>
>     1                                 50                      2
>
>     2                                 60                      4
>
>     3                                 47                      1
>
>     4                                 51                      3
>
>     5                                 69                      5
>
>     6                                 84                      8
>
>     7                                 91                      9
>
>     8                                 74                      6
>
>     9                                 83                      7
>
>    10                                96                     10
>
> strange eh?
>
> ==
> Brian Hamlin
> GeoCal
> OSGeo California Chapter
> 415-717-4462 cell
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>


More information about the postgis-devel mailing list