projects
/
nominatim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcab7a1
)
reverse: choose interpolation only when further than point
author
Sarah Hoffmann
<lonvia@denofr.de>
Sun, 5 Feb 2017 22:02:21 +0000
(23:02 +0100)
committer
Sarah Hoffmann
<lonvia@denofr.de>
Sun, 5 Feb 2017 22:02:21 +0000
(23:02 +0100)
The ST_DWithin check also includes objects that are the same distance.
Another attempt at #545.
lib/ReverseGeocode.php
patch
|
blob
|
history
diff --git
a/lib/ReverseGeocode.php
b/lib/ReverseGeocode.php
index b3899e3b918a6d8ecedcd0780285af6e5b8ddafb..8fc22f694f21792e7b0b0e8906e2913bbb93e4fd 100644
(file)
--- a/
lib/ReverseGeocode.php
+++ b/
lib/ReverseGeocode.php
@@
-153,7
+153,7
@@
class ReverseGeocode
// look for an interpolation that is closer
$aPlaceLine = $this->lookupInterpolation($sPointSQL, $fDistancePlacex);
- if ($aPlaceLine) {
+ if ($aPlaceLine
&& (float) $aPlaceLine['distance'] < (float) $fDistancePlacex
) {
// interpolation is closer to point than placex house
$bPlaceIsLine = true;
$aPlace = $aPlaceLine;