mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-22 21:28:10 +03:00
Parameterise the search only within countries
This commit is contained in:
parent
157f0b8a83
commit
26e78efbb9
@ -85,6 +85,11 @@ class ReverseGeocode
|
|||||||
|
|
||||||
protected function lookupLargeArea($sPointSQL, $iMaxRank)
|
protected function lookupLargeArea($sPointSQL, $iMaxRank)
|
||||||
{
|
{
|
||||||
|
if(CONST_Search_WithinCountries
|
||||||
|
and $this->lookupInCountry($sPointSQL, $iMaxRank) == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if ($iMaxRank > 4) {
|
if ($iMaxRank > 4) {
|
||||||
$aPlace = $this->lookupPolygon($sPointSQL, $iMaxRank);
|
$aPlace = $this->lookupPolygon($sPointSQL, $iMaxRank);
|
||||||
if ($aPlace) {
|
if ($aPlace) {
|
||||||
|
@ -120,6 +120,7 @@ PHP_CONST_DEFS = (
|
|||||||
('Search_NameOnlySearchFrequencyThreshold', 'SEARCH_NAME_ONLY_THRESHOLD', str),
|
('Search_NameOnlySearchFrequencyThreshold', 'SEARCH_NAME_ONLY_THRESHOLD', str),
|
||||||
('Use_US_Tiger_Data', 'USE_US_TIGER_DATA', bool),
|
('Use_US_Tiger_Data', 'USE_US_TIGER_DATA', bool),
|
||||||
('MapIcon_URL', 'MAPICON_URL', str),
|
('MapIcon_URL', 'MAPICON_URL', str),
|
||||||
|
('Search_WithinCountries', 'SEARCH_WITHIN_COUNTRIES', bool),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -214,6 +214,12 @@ NOMINATIM_SERVE_LEGACY_URLS=yes
|
|||||||
# of connections _per worker_.
|
# of connections _per worker_.
|
||||||
NOMINATIM_API_POOL_SIZE=10
|
NOMINATIM_API_POOL_SIZE=10
|
||||||
|
|
||||||
|
# Search elements just within countries
|
||||||
|
# If, despite not finding a point within the static grid of countries, it
|
||||||
|
# finds a geometry of a region, do not return the geometry. Return "Unable
|
||||||
|
# to geocode" instead.
|
||||||
|
NOMINATIM_SEARCH_WITHIN_COUNTRIES=False
|
||||||
|
|
||||||
### Log settings
|
### Log settings
|
||||||
#
|
#
|
||||||
# The following options allow to enable logging of API requests.
|
# The following options allow to enable logging of API requests.
|
||||||
|
Loading…
Reference in New Issue
Block a user