From 330f147b02c14c1435ca17cb4171c13644895a48 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 28 Jan 2015 21:40:08 +0100 Subject: [PATCH] use _st_intersects when dealing with countries, it does not use index --- lib/Geocode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Geocode.php b/lib/Geocode.php index 6632cefb..22ad4332 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1172,7 +1172,7 @@ $sSQL = "select place_id from placex where calculated_country_code='".$aSearch['sCountryCode']."' and rank_search = 4"; if ($sCountryCodesSQL) $sSQL .= " and calculated_country_code in ($sCountryCodesSQL)"; if ($bBoundingBoxSearch) - $sSQL .= " and st_overlaps($this->sViewboxSmallSQL, geometry)"; + $sSQL .= " and _st_intersects($this->sViewboxSmallSQL, geometry)"; $sSQL .= " order by st_area(geometry) desc limit 1"; if (CONST_Debug) var_dump($sSQL); $aPlaceIDs = $this->oDB->getCol($sSQL); -- 2.45.2