不知道Skobbler SDK,但如果在線查詢可用,並且您有大致的地理區域和高速公路的名稱,則可以使用立交API(http://wiki.openstreetmap.org/wiki/Overpass_API)查詢openstreetmap數據庫以查找高速公路參考。
例如,下面的查詢(針對特定BBOX其中包含高速公路的一小部分):
[out:json]
[timeout:25]
;
(
way
["highway"="motorway"]
["name"="Brooklyn-Queens Expressway"]
(40.73483602685421,-73.91463160514832,40.73785205632046,-73.9096748828888);
);
out body qt;
返回(帶爲簡單起見省略了一些鍵 - 值對):
{
"version": 0.6,
"generator": "Overpass API",
"osm3s": {
"timestamp_osm_base": "2015-09-18T20:21:02Z",
"copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
},
"elements": [
{
"type": "way",
"id": 46723482,
"nodes": [
488264429,
488264444,
488264461,
488264512,
488264530,
488264541,
597315979
],
"tags": {
"bicycle": "no",
"bridge": "yes",
"foot": "no",
"hgv": "designated",
"highway": "motorway",
"horse": "no",
"lanes": "3",
"layer": "1",
"name": "Brooklyn-Queens Expressway",
"oneway": "yes",
"ref": "I 278",
"sidewalk": "none",
}
},
{
"type": "way",
"id": 46724225,
"nodes": [
597315978,
488242888,
488248526,
488248544,
488248607
],
"tags": {
"bicycle": "no",
"bridge": "yes",
"foot": "no",
"hgv": "designated",
"highway": "motorway",
"horse": "no",
"lanes": "3",
"layer": "1",
"name": "Brooklyn-Queens Expressway",
"oneway": "yes",
"ref": "I 278",
"sidewalk": "none",
}
}
]
}
這是在osm數據庫中的兩段路。在美國,州際公路的「ref」標籤的格式爲「I XXX」(請參見http://wiki.openstreetmap.org/wiki/Interstate_Highways並注意共存位置的格式)。您可以相應地檢索州際名稱。
您可以在http://overpass-turbo.eu/s/bxi(針對返回的數據按RUN和DATA選項卡,並在另一個bbox中平移查詢地圖)在立交橋turbo(服務的用戶界面)上嘗試上述查詢。