How and what do responseattributes return for the Here Batch Geocoder API?

我只是一个虾纸丫 提交于 2019-12-12 03:23:18

问题


The Here Batch Geocoder API indicates that the responseattributes request parameter can be used. I'm interested in getting geocode quality results back from a batch geocode file.

In the Response Attribute switches documentation it indicates that the default options would be On by default: matchQuality, matchType. But I'm not clear on how this actually gets returned from the batch geocoding API. It sounds like these attributes would be returned in the response, and in the API Explorer for the standard geocoder API it does appear that these are returned in the JSON response.

But the Batch Geocoder API returns an XML response, and then ultimately a collection of files including a final data file. In the Batch Geocoder API explorer, the sample XML response does not include either of those default fields.

At one point the batch geocoder demo credentials listed on the Here documentation worked, and I was able to pull back a small sample results file. I did not see those default responseattributes columns on any of the downloaded files, either.

For the Batch Geocoder API, is there a way to get back information about the quality of the geocoded address, matchQuality, matchType, etc?


回答1:


The responseattributes parameter enables the additional response attributes to be includable with results, e.g. set it to: responseattributes=all The outcols parameter attributes then define which ones you get and where. I use the following request a lot to include scores for results analysis:

http://batch.geocoder.cit.api.here.com/6.2/jobs?action=run&app_code=[your-app-code]&app_id=[your-app-id]&gen=8&header=true&indelim=|&outdelim=|&outcols=displayLatitude,displayLongitude,navigationLatitude,navigationLongitude,mapViewTopLeftLatitude,mapViewTopLeftLongitude,mapViewBottomRightLatitude,mapViewBottomRightLongitude,locationLabel,houseNumber,street,district,city,county,state,postalCode,country,relevance,matchLevel,matchType,matchCode,mapReferenceId,responseAdditionalData,addressAdditionalData&addressattributes=all&locationattributes=all&responseattributes=all&maxresults=5&outputcombined=true&mailto=[yourname@domain.com]




回答2:


It turns out that when you define the output columns for a batch geocode request, you can also list "Address Match Information" fields which provide the information I'm looking for: https://developer.here.com/rest-apis/documentation/batch-geocoder/topics/data-output.html

These fields are entered in the requset query parameters and then showed up on the resulting output data file that was downloaded.

I'm still not sure what the responseattributes parameter does then on the batch geocoder, or if it's even relevant.



来源:https://stackoverflow.com/questions/33392253/how-and-what-do-responseattributes-return-for-the-here-batch-geocoder-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!