Wednesday, 15 June 2011

geocoding - Inconsistent Results from Bing Maps Geocoder -



geocoding - Inconsistent Results from Bing Maps Geocoder -

i wrote application parses csv file, extracts addresses , geocodes them using bing maps rest api. problem having if run same file multiple times, different results. on first trial, rows 2 , 6 might homecoming no matches. on next trial, rows 2 , 6 homecoming matches , row 4 might not. inspected http traffic using fiddler. requests formed, every response returns http status code 200 , valid json, addresses yield results , don't , success or failure of particular address changes trial trial. can provide insight?

update

sample request:

get http://dev.virtualearth.net/rest/v1/locations?o=json&admindistrict=mi&locality=shelby&postalcode=49455-1299&addressline=72+south+state+street&key={myapikey} http/1.1 host: dev.virtualearth.net

sample response:

http/1.1 200 ok cache-control: no-cache transfer-encoding: chunked content-type: application/json server: microsoft-iis/8.0 x-bm-traceid: 9b6cfaa0abdb47b7b7e2790900bcddce x-bm-srv: bl2m001304, bl2msnvm001275, bl2msnvm001299 x-ms-bm-ws-info: 0 x-aspnet-version: 4.0.30319 x-powered-by: asp.net date: fri, 22 feb 2013 15:14:30 gmt 247 { "authenticationresultcode":"validcredentials", "brandlogouri":"http:\/\/dev.virtualearth.net\/branding\/logo_powered_by.png", "copyright":"copyright © 2013 microsoft , suppliers. rights reserved. api cannot accessed , content , results may not used, reproduced or transmitted in manner without express written permission microsoft corporation.", "resourcesets": [ { "estimatedtotal":0, "resources":[] } ], "statuscode":200, "statusdescription":"ok", "traceid":"9b6cfaa0abdb47b7b7e2790900bcddce|bl2m001304|02.00.83.1900|bl2msnvm001275, bl2msnvm001299" } 0

my post on msdn forums: http://social.msdn.microsoft.com/forums/en-us/bingmapsservices/thread/c7fea1b2-f87e-40c2-a3a6-496989a338b2#b885ca9a-018a-491f-9caa-a00a515cf9a8

bing maps key , rate limitation information

i'm sure you're using bing maps key trial or basic key. type of key rate limited obvious reasons (on 24h period , time between request) , that's reason why you're getting blank response without info regarding fact failed geocode.

see terms of utilize regarding limitations , other restrictions (stress test , hammering part of it): http://www.microsoft.com/maps/product/terms.html

so, in order solve problem, should:

check type of key you're using , how many calls you're making on specific period check header of response, should include specific header value: x-ms-bm-ws-info set 1

see msdn error handling: http://msdn.microsoft.com/en-us/library/ff701703.aspx

if you're not in case (if have enterprise account), reach technical back upwards can officialy , check key.

additional information:

since you're using geocoder using csv, highly recommend utilize bing maps spatial info service perform batch geocoding, see finish info on msdn: http://msdn.microsoft.com/en-us/library/ff701733.aspx

it cut down number of transactions create (each geocode dataflow job counts 1 transaction , can include on 200 000 entities each file).

geocoding geospatial bing-maps bing-maps-api

No comments:

Post a Comment