Hi,
We have made a few fresh installations of Nominatim lately according to the
documentation on http://wiki.openstreetmap.org/wiki/Nominatim/Installation
Our installations sometimes give different results than the official on
nominatim.openstreetmap.org. So far we have seen the following differences:
1). Hits in Norway and Australia get the country code aq (Antarctica)
Query:
http://nominatim.openstreetmap.org/search.php?format=json&q=spektrum,oslo&addressdetails=1
Result:
{"place_id":"5999966361","licence":"Data \u00a9 OpenStreetMap contributors,
ODbL 1.0.
http:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"10568134","boundingbox":["59.9124526977539","59.9133567810059","10.7537364959717","10.7557983398438"],"lat":"59.91290535","lon":"10.7546926800259","display_name":"Oslo
Spektrum, 2, Sonja Henies plass, Vaterland, Sentrum, Oslo, 0785,
Norway","class":"tourism","type":"attraction","importance":0.67918864804464,"icon":"http:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_point_of_interest.p.20.png","address":{"attraction":"Oslo
Spektrum","house_number":"2","road":"Sonja Henies
plass","suburb":"Vaterland","city_district":"Sentrum","city":"Oslo","county":"Oslo","state":"Oslo","postcode":"0785","administrative":"Norway","country_code":"no"}}
Result from our server:
{"place_id":"34638614","licence":"Data \u00a9 OpenStreetMap contributors, ODbL
1.0.
http:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"10568134","boundingbox":["59.9124544","59.9133563","10.7537372","10.7557978"],"lat":"59.91289595","lon":"10.7546996929979","display_name":"Oslo
Spektrum, 2, Sonja Henies plass, Vaterland, Sentrum, Oslo, 0785,
Norway","class":"tourism","type":"attraction","importance":0.67918864804464,"icon":"http:\/\/twin192\/nominatim\/images\/mapicons\/poi_point_of_interest.p.20.png","address":{"attraction":"Oslo
Spektrum","house_number":"2","road":"Sonja Henies
plass","suburb":"Vaterland","city_district":"Sentrum","city":"Oslo","county":"Oslo","state":"Oslo","postcode":"0785","country":"Norway","country_code":"aq"}}
The main difference is:
"administrative":"Norway","country_code":"no"
"country":"Norway","country_code":"aq"
2). Differences in importance
Query: http://nominatim.openstreetmap.org/search.php?format=json&q=zagreb
{"place_id":"6009489839","licence":"Data \u00a9 OpenStreetMap contributors,
ODbL 1.0.
http:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"3168167","boundingbox":["45.7472991943359","45.9403457641602","15.8206872940063","16.1059093475342"],"lat":"45.8131545","lon":"15.9770298","display_name":"Zagreb,
Grad Zagreb,
Croatia","class":"boundary","type":"administrative","importance":0.80134698575067,"icon":"http:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png"}
{"place_id":"135454810","licence":"Data \u00a9 OpenStreetMap contributors, ODbL
1.0.
http:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"3168167","boundingbox":["45.7473017","45.9403433","15.8206873","16.1059084"],"lat":"45.8131545","lon":"15.9770298","display_name":"Zagreb,
Grad Zagreb,
Croatia","class":"boundary","type":"administrative","importance":0.45,"icon":"http:\/\/twin192\/nominatim\/images\/mapicons\/poi_boundary_administrative.p.20.png"}
"importance":0.80134698575067 vs "importance":0.45
3). Places not found using structured address search
Query:
http://nominatim.openstreetmap.org/search.php?format=json&city=tao%20yuan%20xian&country=taiwan
10 places found on nominatim.openstreetmap.org vs 0 on our server.
I attached debug output from our server
Any ideas what may be causing these issues?
Our setup is something like CentOS 6, postgresql 9.3, PHP 5.3, Python 2.6
We've used both Nominatim 2.1 and 2.2 for import with the same results
Best regards,
--
Anders Gunnarsson
string(262) "select word_id,word_token, word, class, type, country_code,
operator, search_name_count from word where word_token in (' tao yuan
xian','tao yuan xian',' tao','tao',' yuan xian','yuan xian',' yuan','yuan','
xian','xian',' tao yuan','tao yuan',' taiwan','taiwan')" array(2) { [0]=>
array(3) { ["string"]=> string(13) "tao yuan xian" ["words"]=> array(3) { [0]=>
string(3) "tao" [1]=> string(4) "yuan" [2]=> string(4) "xian" } ["wordsets"]=>
array(4) { [0]=> array(1) { [0]=> string(13) "tao yuan xian" } [1]=> array(2) {
[0]=> string(3) "tao" [1]=> string(9) "yuan xian" } [2]=> array(3) { [0]=>
string(3) "tao" [1]=> string(4) "yuan" [2]=> string(4) "xian" } [3]=> array(2)
{ [0]=> string(8) "tao yuan" [1]=> string(4) "xian" } } } [1]=> array(3) {
["string"]=> string(6) "taiwan" ["words"]=> array(1) { [0]=> string(6) "taiwan"
} ["wordsets"]=> array(1) { [0]=> array(1) { [0]=> string(6) "taiwan" } } } }
array(12) { ["taiwan"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(6)
"226984" ["word_token"]=> string(6) "taiwan" ["word"]=> NULL ["class"]=> NULL
["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL
["search_name_count"]=> string(3) "220" } } [" taiwan"]=> array(2) { [0]=>
array(8) { ["word_id"]=> string(8) "30690178" ["word_token"]=> string(7) "
taiwan" ["word"]=> NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=>
string(2) "tw" ["operator"]=> NULL ["search_name_count"]=> string(1) "0" }
[1]=> array(8) { ["word_id"]=> string(7) "5518715" ["word_token"]=> string(7) "
taiwan" ["word"]=> string(8) "TáiwÄn" ["class"]=> NULL ["type"]=> NULL
["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1)
"0" } } ["tao"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(4) "5322"
["word_token"]=> string(3) "tao" ["word"]=> NULL ["class"]=> NULL ["type"]=>
NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=>
string(4) "5406" } } [" tao"]=> array(1) { [0]=> array(8) { ["word_id"]=>
string(7) "2235830" ["word_token"]=> string(4) " tao" ["word"]=> string(6)
"ТÐÐ" ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL
["operator"]=> NULL ["search_name_count"]=> string(1) "0" } } [" tao yuan"]=>
array(1) { [0]=> array(8) { ["word_id"]=> string(8) "13301577" ["word_token"]=>
string(9) " tao yuan" ["word"]=> string(6) "æ¡æº" ["class"]=> NULL ["type"]=>
NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=>
string(1) "0" } } ["tao yuan"]=> array(1) { [0]=> array(8) { ["word_id"]=>
string(8) "13301578" ["word_token"]=> string(8) "tao yuan" ["word"]=> NULL
["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL
["search_name_count"]=> string(1) "0" } } [" tao yuan xian"]=> array(1) { [0]=>
array(8) { ["word_id"]=> string(8) "11886063" ["word_token"]=> string(14) " tao
yuan xian" ["word"]=> string(9) "æ¡æºå¿" ["class"]=> NULL ["type"]=> NULL
["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1)
"0" } } ["tao yuan xian"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(8)
"11886064" ["word_token"]=> string(13) "tao yuan xian" ["word"]=> NULL
["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=> NULL
["search_name_count"]=> string(1) "0" } } ["xian"]=> array(1) { [0]=> array(8)
{ ["word_id"]=> string(4) "2863" ["word_token"]=> string(4) "xian" ["word"]=>
NULL ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=>
NULL ["search_name_count"]=> string(6) "403855" } } [" xian"]=> array(1) {
[0]=> array(8) { ["word_id"]=> string(7) "1320785" ["word_token"]=> string(5) "
xian" ["word"]=> string(5) "XI'AN" ["class"]=> NULL ["type"]=> NULL
["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=> string(1)
"0" } } ["yuan"]=> array(1) { [0]=> array(8) { ["word_id"]=> string(3) "282"
["word_token"]=> string(4) "yuan" ["word"]=> NULL ["class"]=> NULL ["type"]=>
NULL ["country_code"]=> NULL ["operator"]=> NULL ["search_name_count"]=>
string(6) "103376" } } [" yuan"]=> array(1) { [0]=> array(8) { ["word_id"]=>
string(7) "6655390" ["word_token"]=> string(5) " yuan" ["word"]=> string(4)
"YUAN" ["class"]=> NULL ["type"]=> NULL ["country_code"]=> NULL ["operator"]=>
NULL ["search_name_count"]=> string(1) "0" } } }
tao yuan xian
VALID: tao yuan xian
tao
VALID: tao
yuan xian
tao
VALID: tao
yuan
VALID: yuan
VALID: yuan
xian
VALID: xian
tao yuan
VALID: tao yuan
xian
VALID: xian
VALID: xian
taiwan
VALID: taiwan
VALID: taiwan
VALID: taiwan
VALID: taiwanarray(4) { [2]=> array(2) { [0]=> array(16) { ["iSearchRank"]=>
int(2) ["iNamePhrase"]=> int(-1) ["sCountryCode"]=> string(2) "tw" ["aName"]=>
array(1) { [11886063]=> string(8) "11886063" } ["aAddress"]=> array(0) { }
["aFullNameAddress"]=> array(0) { } ["aNameNonSearch"]=> array(0) { }
["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) ""
["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0)
"" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0)
"" ["fRadius"]=> string(0) "" } [1]=> array(16) { ["iSearchRank"]=> int(2)
["iNamePhrase"]=> int(-1) ["sCountryCode"]=> bool(false) ["aName"]=> array(1) {
[11886063]=> string(8) "11886063" } ["aAddress"]=> array(1) { [226984]=>
string(6) "226984" } ["aFullNameAddress"]=> array(1) { [5518715]=> string(7)
"5518715" } ["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0)
{ } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=>
string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) ""
["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } }
[3]=> array(2) { [0]=> array(16) { ["iSearchRank"]=> int(3) ["iNamePhrase"]=>
int(0) ["sCountryCode"]=> string(2) "tw" ["aName"]=> array(1) { [11886064]=>
string(8) "11886064" } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=>
array(0) { } ["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0)
{ } ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=>
string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) ""
["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" }
[1]=> array(16) { ["iSearchRank"]=> int(3) ["iNamePhrase"]=> int(0)
["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [11886064]=> string(8)
"11886064" } ["aAddress"]=> array(1) { [226984]=> string(6) "226984" }
["aFullNameAddress"]=> array(1) { [5518715]=> string(7) "5518715" }
["aNameNonSearch"]=> array(0) { } ["aAddressNonSearch"]=> array(0) { }
["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=>
string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) ""
["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" } }
[5]=> array(2) { [0]=> array(16) { ["iSearchRank"]=> int(5) ["iNamePhrase"]=>
int(0) ["sCountryCode"]=> string(2) "tw" ["aName"]=> array(1) { [13301578]=>
string(8) "13301578" } ["aAddress"]=> array(0) { } ["aFullNameAddress"]=>
array(1) { [1320785]=> string(7) "1320785" } ["aNameNonSearch"]=> array(1) {
[2863]=> string(4) "2863" } ["aAddressNonSearch"]=> array(0) { }
["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=>
string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) ""
["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" }
[1]=> array(16) { ["iSearchRank"]=> int(5) ["iNamePhrase"]=> int(0)
["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [13301578]=> string(8)
"13301578" } ["aAddress"]=> array(1) { [226984]=> string(6) "226984" }
["aFullNameAddress"]=> array(2) { [1320785]=> string(7) "1320785" [5518715]=>
string(7) "5518715" } ["aNameNonSearch"]=> array(1) { [2863]=> string(4) "2863"
} ["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) ""
["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0)
"" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0)
"" ["fRadius"]=> string(0) "" } } [7]=> array(2) { [0]=> array(16) {
["iSearchRank"]=> int(7) ["iNamePhrase"]=> int(0) ["sCountryCode"]=> string(2)
"tw" ["aName"]=> array(1) { [5322]=> string(4) "5322" } ["aAddress"]=> array(0)
{ } ["aFullNameAddress"]=> array(2) { [6655390]=> string(7) "6655390"
[1320785]=> string(7) "1320785" } ["aNameNonSearch"]=> array(2) { [282]=>
string(3) "282" [2863]=> string(4) "2863" } ["aAddressNonSearch"]=> array(0) {
} ["sOperator"]=> string(0) "" ["aFeatureName"]=> array(0) { } ["sClass"]=>
string(0) "" ["sType"]=> string(0) "" ["sHouseNumber"]=> string(0) ""
["fLat"]=> string(0) "" ["fLon"]=> string(0) "" ["fRadius"]=> string(0) "" }
[1]=> array(16) { ["iSearchRank"]=> int(7) ["iNamePhrase"]=> int(0)
["sCountryCode"]=> bool(false) ["aName"]=> array(1) { [5322]=> string(4) "5322"
} ["aAddress"]=> array(1) { [226984]=> string(6) "226984" }
["aFullNameAddress"]=> array(3) { [6655390]=> string(7) "6655390" [1320785]=>
string(7) "1320785" [5518715]=> string(7) "5518715" } ["aNameNonSearch"]=>
array(2) { [282]=> string(3) "282" [2863]=> string(4) "2863" }
["aAddressNonSearch"]=> array(0) { } ["sOperator"]=> string(0) ""
["aFeatureName"]=> array(0) { } ["sClass"]=> string(0) "" ["sType"]=> string(0)
"" ["sHouseNumber"]=> string(0) "" ["fLat"]=> string(0) "" ["fLon"]=> string(0)
"" ["fRadius"]=> string(0) "" } } }
rank Name Tokens Name Not Address Tokens Address Not country
operator class type house# Lat Lon Radius
2 # tao yuan xian(11886063)# tw
2 # tao yuan xian(11886063)# #taiwan(226984)#
3 #tao yuan xian(11886064)# tw
3 #tao yuan xian(11886064)# #taiwan(226984)#
5 #tao yuan(13301578)# #xian(2863)# tw
5 #tao yuan(13301578)# #xian(2863)# #taiwan(226984)#
7 #tao(5322)# #yuan(282)#, #xian(2863)# tw
7 #tao(5322)# #yuan(282)#, #xian(2863)# #taiwan(226984)#
Search Loop, group 1, loop 1
rank Name Tokens Name Not Address Tokens Address Not country
operator class type house# Lat Lon Radius
2 # tao yuan xian(11886063)# tw
string(241) "select place_id, 0::int as exactmatch from search_name where
name_vector @> ARRAY[11886063] and country_code = 'tw' order by (case when
importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else
importance end) DESC limit 20"
Place IDs: array(2) { [0]=> string(9) "135408541" [1]=> string(6) "276909" }
Search Loop, group 1, loop 2
rank Name Tokens Name Not Address Tokens Address Not country
operator class type house# Lat Lon Radius
2 # tao yuan xian(11886063)# #taiwan(226984)#
string(367) "select place_id, (select count(*) from (select
unnest(ARRAY[5518715]) INTERSECT select unnest(nameaddress_vector))s) as
exactmatch from search_name where name_vector @> ARRAY[11886063] and
nameaddress_vector @> ARRAY[226984] order by (case when importance = 0 OR
importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC,
exactmatch DESC limit 20"
Place IDs: array(1) { [0]=> string(6) "276909" } string(258) "select place_id
from placex where place_id in (135408541,276909) and (placex.rank_address
between 14 and 24 OR (extratags->'place') = 'city') UNION select place_id from
location_property_tiger where place_id in (135408541,276909) and (30 between 14
and 24 )" Search Loop, group 2, loop 3
rank Name Tokens Name Not Address Tokens Address Not country
operator class type house# Lat Lon Radius
3 #tao yuan xian(11886064)# tw
string(241) "select place_id, 0::int as exactmatch from search_name where
name_vector @> ARRAY[11886064] and country_code = 'tw' order by (case when
importance = 0 OR importance IS NULL then 0.75-(search_rank::float/40) else
importance end) DESC limit 20"
Place IDs: array(2) { [0]=> string(9) "135408541" [1]=> string(6) "276909" }
Search Loop, group 2, loop 4
rank Name Tokens Name Not Address Tokens Address Not country
operator class type house# Lat Lon Radius
3 #tao yuan xian(11886064)# #taiwan(226984)#
string(367) "select place_id, (select count(*) from (select
unnest(ARRAY[5518715]) INTERSECT select unnest(nameaddress_vector))s) as
exactmatch from search_name where name_vector @> ARRAY[11886064] and
nameaddress_vector @> ARRAY[226984] order by (case when importance = 0 OR
importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC,
exactmatch DESC limit 20"
Place IDs: array(1) { [0]=> string(6) "276909" } string(258) "select place_id
from placex where place_id in (135408541,276909) and (placex.rank_address
between 14 and 24 OR (extratags->'place') = 'city') UNION select place_id from
location_property_tiger where place_id in (135408541,276909) and (30 between 14
and 24 )" Search Loop, group 3, loop 5
rank Name Tokens Name Not Address Tokens Address Not country
operator class type house# Lat Lon Radius
5 #tao yuan(13301578)# #xian(2863)# tw
string(412) "select place_id, (select count(*) from (select
unnest(ARRAY[1320785]) INTERSECT select unnest(nameaddress_vector))s) as
exactmatch from search_name where name_vector @> ARRAY[13301578] and
array_cat(name_vector,ARRAY[]::integer[]) @> ARRAY[2863] and country_code =
'tw' order by (case when importance = 0 OR importance IS NULL then
0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit
20"
Place IDs: array(0) { } Search Loop, group 3, loop 6
rank Name Tokens Name Not Address Tokens Address Not country
operator class type house# Lat Lon Radius
5 #tao yuan(13301578)# #xian(2863)# #taiwan(226984)#
string(436) "select place_id, (select count(*) from (select
unnest(ARRAY[1320785,5518715]) INTERSECT select unnest(nameaddress_vector))s)
as exactmatch from search_name where name_vector @> ARRAY[13301578] and
array_cat(name_vector,ARRAY[]::integer[]) @> ARRAY[2863] and nameaddress_vector
@> ARRAY[226984] order by (case when importance = 0 OR importance IS NULL then
0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit
20"
Place IDs: array(0) { } Search Loop, group 4, loop 7
rank Name Tokens Name Not Address Tokens Address Not country
operator class type house# Lat Lon Radius
7 #tao(5322)# #yuan(282)#, #xian(2863)# tw
string(420) "select place_id, (select count(*) from (select
unnest(ARRAY[6655390,1320785]) INTERSECT select unnest(nameaddress_vector))s)
as exactmatch from search_name where name_vector @> ARRAY[5322] and
array_cat(name_vector,ARRAY[]::integer[]) @> ARRAY[282,2863] and country_code =
'tw' order by (case when importance = 0 OR importance IS NULL then
0.75-(search_rank::float/40) else importance end) DESC, exactmatch DESC limit
20"
Place IDs: array(0) { } Search Loop, group 4, loop 8
rank Name Tokens Name Not Address Tokens Address Not country
operator class type house# Lat Lon Radius
7 #tao(5322)# #yuan(282)#, #xian(2863)# #taiwan(226984)#
string(444) "select place_id, (select count(*) from (select
unnest(ARRAY[6655390,1320785,5518715]) INTERSECT select
unnest(nameaddress_vector))s) as exactmatch from search_name where name_vector
@> ARRAY[5322] and array_cat(name_vector,ARRAY[]::integer[]) @> ARRAY[282,2863]
and nameaddress_vector @> ARRAY[226984] order by (case when importance = 0 OR
importance IS NULL then 0.75-(search_rank::float/40) else importance end) DESC,
exactmatch DESC limit 20"
Place IDs: array(0) { }
_______________________________________________
Geocoding mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/geocoding