平台数据扩展:如何解析ROAD_NAME_FCN

时间:2018-07-30 19:06:45

标签: here-api

我正在使用HERE的Platform Data Extension检索道路名称。但是,我不明白我得到的字符串。我怀疑它们是以某种方式编码的,但是我不知道如何解码它们。

例如:

ENGBNFDR Dr NNASN"e|fe "de "e|rre "dri|ve "nol|te;NASY"e|fe "de "e|rre;<snip>

如果我用“记录分隔符”字符将它们分开,例如link_names.split('\x1e')的值看起来更容易理解,但只有一点。还有一些我不明白的怪异缩写,例如ENGBN

1 个答案:

答案 0 :(得分:2)

PDE图层文档可在以下位置找到:http://pde.cit.api.here.com/1/doc/content.html?detail=1&app_id=xxx&app_code=yyy

  

图层> ROAD_NAME_FC1>名称。

此对象的所有名称的列表,所有语言,拉丁语1 /拼音/语音音译。 为了方便起见,首先列出了非匿名基本名称。

格式:

NAMES = NAME1 \u001D NAME2 \u001D NAME3 ... 
NAME = NAME_TEXT \u001E TRANSLIT1 ; TRANSLIT2 ; ... \u001E PHONEME1 ; PHONEME2 ; ... NAME_TEXT = LANGUAGE_CODE NAME_TYPE IS_EXONYM text 
TRANSLIT = LANGUAGE_CODE text 
PHONEME = LANGUAGE_CODE IS_PREFERRED text 
LANGUAGE_CODE is a 3 character string 
NAME_TYPE is one letter (A = abbreviation, B = base name, E = exonym, K = shortened name, S = synonym) 
IS_EXONYM = Y if the name is a translation into another language 
IS_PREFERRED = Y if this is the preferred phoneme. 

Please note, the delimiters are: 
\u001D between languages (NAMES level) 
\u001E between name text, transliterations, and phonemes ';' between different transliterations and phonemes of the same name.