https://bugzilla.wikimedia.org/show_bug.cgi?id=45661

       Web browser: ---
            Bug ID: 45661
           Summary: Distance query sometimes overreaches the specified
                    distance
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: SemanticMaps
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

Using a distance query like [[Has coordinates::X N, Y E (Z km)]] is, according
to the example page, supposed to query for all items with a coordinate property
set Z km from the point X N, Y E. But as the algorithm used (seemingly, at
least) only defines a "square" of 2Z km * 2Z km centered on X N, Y E, the query
sometimes overreaches beyond a distance of Z. A worst case scenario is when an
item is placed at a corner of this box, where it considers an item of distance
sqrt(2)*Z km from X N, Y E to be a hit. This is an overshoot of over 41%.

I'd suggest, without having studied the code in detail, to add a step in the
algorithm where you do a proper distance calculation on the hits within the
bounding square to filter out the ones that are actually too far away.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to