我在提名搜索方面需要帮助。我需要去某个城市最近的学校、银行、杂货店等。我在http://wiki.openstreetmap.org/wiki/Nominatim/Special_Phrases/EN中找到了关键字,但我不知道它如何使用,我试着给出http://nominatim.openstreetmap.org/search ?q=grocery,bangalore&format=xml&polygon=1&addressdetails=1 ,但对于某些关键字没有结果。任何人都可以帮助我吗..?
问问题
4010 次
1 回答
3
检查他们的维基条目
为什么我的搜索没有找到任何东西
没有找到结果的原因有很多:
- 目前 OSM 中没有符合您条件的数据。您期望匹配的数据可能存在某种缺陷。例如,如果您搜索“马萨诸塞州斯普林菲尔德”,如果州边界已被破坏并且不再包围斯普林菲尔德,则可能找不到。
- 数据尚未编入索引,nominatim 通常至少落后 2 天。
- 空间有显着差异(即placestrasse和place strasse)
- 搜索查询有问题(即城市、街道、国家/地区)(注意:这似乎是一个常见的德国搜索查询,目前无法使用)
- 搜索查询未使用正确的编码
原因似乎是没有符合您条件的数据
更新
特殊短语的使用方式如下。
为了找到印度的所有机场,
http://nominatim.openstreetmap.org/search?q=airports%20in%20india&format=xml
结果是
<searchresults timestamp="Thu, 02 Aug 12 12:34:41 +0100" attribution="Data Copyright OpenStreetMap Contributors, Some Rights Reserved. CC-BY-SA 2.0." querystring="airports in india" polygon="false" exclude_place_ids="43175810,7784961,7751465,12009403,106962559,668626,49996185,7799105,12685353,107628126" more_url="http://nominatim.openstreetmap.org/search?format=xml&exclude_place_ids=43175810,7784961,7751465,12009403,106962559,668626,49996185,7799105,12685353,107628126&accept-language=en-US,en;q=0.8&q=airports+in+india">
<place place_id="43175810" osm_type="way" osm_id="34863658" place_rank="30" boundingbox="26.3935852050781,26.4172687530518,80.3976287841797,80.4333038330078" lat="26.4057076136426" lon="80.4137093712447" display_name="Greter Kailash Ave, Kanpur Cantonment, Unnao, Kanpur Nagar, Uttar Pradesh, India" class="aeroway" type="aerodrome"/>
<place place_id="7784961" osm_type="node" osm_id="747215270" place_rank="30" boundingbox="20.502386322021,20.52238822937,83.436968078613,83.456975708008" lat="20.5123864" lon="83.4469754" display_name="Nuagaon Airstrip, NH201, Balangir, Balangir, Orissa, India" class="aeroway" type="aerodrome"/>
<place place_id="7751465" osm_type="node" osm_id="747078022" place_rank="30" boundingbox="24.421943893433,24.441945800781,74.859438171387,74.879445800781" lat="24.4319457" lon="74.8694404" display_name="Nimach, NH 79, Chittaurgarh, Neemuch, Madhya Pradesh, India" class="aeroway" type="aerodrome"/>
<place place_id="12009403" osm_type="node" osm_id="1042045133" place_rank="30" boundingbox="18.217125167847,18.237127075195,74.578508605957,74.598516235352" lat="18.2271264" lon="74.5885098" display_name="Baramati Airport, Satara, India" class="aeroway" type="aerodrome"/>
<place place_id="106962559" osm_type="way" osm_id="119388136" place_rank="30" boundingbox="19.0674076080322,19.0793800354004,82.0245513916016,82.0459518432617" lat="19.0733705761589" lon="82.0349698897843" display_name="NH43, Jagdalpur, Bastar, Chhattisgarh, 494001, India" class="aeroway" type="aerodrome"/>
<place place_id="668626" osm_type="node" osm_id="245717090" place_rank="30" boundingbox="23.881885757446,23.901887664795,91.231897583008,91.251905212402" lat="23.8918874" lon="91.2419012" display_name="Agartala Singerbhil Airport, Agartala, West Tripura, Tripura, India" class="aeroway" type="aerodrome"/>
<place place_id="49996185" osm_type="way" osm_id="44280184" place_rank="30" boundingbox="22.7103366851807,22.7298049926758,75.7778625488281,75.8157043457031" lat="22.7203044430038" lon="75.8015038572736" display_name="NH59, Indore, Madhya Pradesh, India" class="aeroway" type="aerodrome"/>
<place place_id="7799105" osm_type="node" osm_id="747164669" place_rank="30" boundingbox="23.578140487671,23.59814239502,74.301943054199,74.321950683594" lat="23.5881413" lon="74.3119453" display_name="Banswara Airstrip, Talwara, Banswara, Banswara, Rajasthan, India" class="aeroway" type="aerodrome"/>
<place place_id="12685353" osm_type="node" osm_id="1126264804" place_rank="30" boundingbox="9.8254778289795,9.8454787826538,78.081613769531,78.101621398926" lat="9.8354784" lon="78.0916139" display_name="Madurai Airport, Madurai Ring Road, Madurai, Tamil Nadu, India" class="aeroway" type="aerodrome"/>
<place place_id="107628126" osm_type="way" osm_id="120223227" place_rank="30" boundingbox="25.4841022491455,25.4955101013184,78.5546188354492,78.5676498413086" lat="25.4899825689522" lon="78.5611975700734" display_name="NH75, Jhansi, Jhansi, Jhansi, Uttar Pradesh, 284001, India" class="aeroway" type="aerodrome"/>
</searchresults>
同样,如果我想知道德里附近的机场(班加罗尔附近的机场没有数据),
http://nominatim.openstreetmap.org/search?q=airports%20near%20delhi&format=xml
我得到所需的结果
<searchresults timestamp="Thu, 02 Aug 12 12:39:36 +0100" attribution="Data Copyright OpenStreetMap Contributors, Some Rights Reserved. CC-BY-SA 2.0." querystring="airports near delhi" polygon="false" exclude_place_ids="49967570,34283281,7655222,4065575" more_url="http://nominatim.openstreetmap.org/search?format=xml&exclude_place_ids=49967570,34283281,7655222,4065575&accept-language=en-US,en;q=0.8&q=airports+near+delhi">
<place place_id="49967570" osm_type="way" osm_id="44193643" place_rank="30" boundingbox="28.5804119110107,28.5891227722168,77.1994857788086,77.2125244140625" lat="28.5845082232308" lon="77.2063039751188" display_name="Brigadiar Hoshiar Singh Marg, Sarojini Nagar, New Delhi, South West Delhi, South Delhi, National Capital Territory of Delhi, 110067, India" class="aeroway" type="aerodrome"/>
<place place_id="34283281" osm_type="way" osm_id="22826678" place_rank="30" boundingbox="28.5350399017334,28.577335357666,77.0600891113281,77.133056640625" lat="28.5566876998427" lon="77.0963262062259" display_name="Indira Gandhi International, Old Delhi Gurgaon Road, Mahipalpur, Rangpuri, South West Delhi, National Capital Territory of Delhi, 110037, India" class="aeroway" type="aerodrome"/>
<place place_id="7655222" osm_type="node" osm_id="727371731" place_rank="30" boundingbox="28.542173614502,28.562175521851,77.085321655273,77.105329284668" lat="28.5521755" lon="77.0953223" display_name="Indira Gandhi International Airport, Old Delhi Gurgaon Road, Mahipalpur, Rangpuri, South West Delhi, National Capital Territory of Delhi, 110037, India" class="aeroway" type="aerodrome"/>
<place place_id="4065575" osm_type="node" osm_id="410403385" place_rank="30" boundingbox="28.574936141968,28.594938049316,77.196535339355,77.21654296875" lat="28.5849375" lon="77.206542" display_name="Safdarjung Airport, Brigadiar Hoshiar Singh Marg, Sarojini Nagar, New Delhi, South West Delhi, South Delhi, National Capital Territory of Delhi, 110067, India" class="aeroway" type="aerodrome"/>
</searchresults>
您可以附加 &polygon=1 以获取多边形点,并附加 &addressdetail=1 以获取上述每个查询的基于地址的 xml。
于 2012-08-02T09:30:25.720 回答