X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9e4e913bf7ab000488e7a58f5cac1c7ebedc399b..e6775e713c2a1c009f7a01fad674a545e0e6bb39:/lib-php/SearchDescription.php diff --git a/lib-php/SearchDescription.php b/lib-php/SearchDescription.php index 3f3beab1..b98c2e72 100644 --- a/lib-php/SearchDescription.php +++ b/lib-php/SearchDescription.php @@ -807,6 +807,7 @@ class SearchDescription $sSQL = 'SELECT geometry FROM placex'; $sSQL .= " WHERE place_id in ($sPlaceIDs)"; $sSQL .= " AND rank_search < $iMaxRank + 5"; + $sSQL .= ' AND ST_Area(Box2d(geometry)) < 20'; $sSQL .= " AND ST_GeometryType(geometry) in ('ST_Polygon','ST_MultiPolygon')"; $sSQL .= ' ORDER BY rank_search ASC '; $sSQL .= ' LIMIT 1';