Getting highway name - Skobbler

I need to get the name of the highway that the user is currently moving on. This can be done in navigation mode, getting it from

-(void)routingService:(SKRoutingService *)routingService didChangeCurrentStreetName:(NSString *)currentStreetName streetType:(SKStreetType)streetType countryCode:(NSString *)countryCode

So, when I tested my application yesterday, I was on the highway, and yes, Scobler really admitted that I was on one, and yes, I got the name of the highway.

It was the Brooklyn Queens Expressway. But, the Brooklyn-Queens Expressway is actually the name of the Interstate I-278, and all the functions that I will have to use later should get the name of the highway in this I-nnn format

Here is a photo of the map, what do I mean

enter image description here

, streetName I-nnn, streetType ? - Open Streetmap, ? - Windows Vista.

+4
2

SDK Skobbler, - , API Overpass (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",
  }
}

  ]
}

2 osm. "ref" "I XXX" (. http://wiki.openstreetmap.org/wiki/Interstate_Highways ). .

overpass-turbo ( ) http://overpass-turbo.eu/s/bxi ( RUN DATA bbox).

+3

"ref" SDK ( TODO).

( TTS), ( $ref, , ). . .

+1

Source: https://habr.com/ru/post/1608017/


All Articles