Discrepancies between API info and MQ website info

4 posts / 0 new
Last post
brucesteinback@...
Discrepancies between API info and MQ website info

Sigh, I'd put this question in before the 'reset', but it appears to be lost now, so ...

I wrote an application for a friend to get distances (for expense report forms).  But some of the addresses report different mileage thru the API than on MQ (both using shortest distance but no other modifications). e.g.: (all directions below start from 438 Northumberland Ave., Redwood City, CA):
to 1095 Homestead Rd., Santa Clara CA: 18.845 mi vs. 18.73 on MQ
to 2970 Willow Pass Rd, Concord CA: 49.705 mi vs. 50.59 on MQ
Not large differences admittedly, but just enough to be annoying

But what's really infuriating is that some of the addresses are just not found in the API (well, different recently, see below). The addresses are all courthouses, so they've been around forever. And nearby addresses (e.g. next door or around the corner) mostly work fine:

170 Park Center Plaza, San Jose CA
1000 Center Dr., Pittsburg CA
400 County Center Dr., Redwood City, CA
222 East Weber, Stockton CA
222 Paul Scannell Dr., San Mateo CA

The last one is the worst in that none of the addresses on that street or even a few nearby ones (Loop Rd or Lessingia Ct) come up either!

As noted above, the behavior has changed recently in a rather bizarre fashion. The above addresses seem to work (haven't tried them all), but they all give a location somewhere on the Kansas/Oklahoma border ("lr":{"lng":-100.446014,"lat":37.46899}}) and an associated distance of 1468.1251 miles. But the directions (to the extent that I could follow them) wander about locally in the San Francisco Bay area rather than hopping on a freeway headed east.

Here is one of my requests and the associated response:

Request:
http://open.mapquestapi.com/directions/v2/route?key=(My key)&outFormat=json&routeType=shortest&narrativeType=none&from=438+Northumberland+Avenue%2C+Redwood+City%2C+CA&to=400+County+Center+Dr.%2C+Redwood+City%2C+CA

Response (partial):
{"route":{"hasTollRoad":false,"computedWaypoints":[],"fuelUsed":66.4,"hasUnpaved":false,"hasHighway":true,"realTime":-1,"boundingBox":{"ul":{"lng":-122.222816,"lat":39.828163},"lr":{"lng":-100.446014,"lat":37.46899}},"distance":1468.1251,"time":94504,"locationSequence":[0,1],"hasSeasonalClosure":false,"sessionId":"559c2c2c-002a-0017-02b7-375b-00163e14b96a","locations":[{"latLng":{"lng":-122.219953,"lat":37.46915},"adminArea4":"San Mateo County","adminArea5Type":"City","adminArea4Type":"County","adminArea5":"Redwood City","street":"438 Northumberland Avenue","adminArea1":"US","adminArea3":"CA","type":"s","displayLatLng":{"lng":-122.219955,"lat":37.46915},"linkId":2974250,"postalCode":"94061","sideOfStreet":"N","dragPoint":false,"adminArea1Type":"Country","geocodeQuality":"POINT","geocodeQualityCode":"P1AAX","adminArea3Type":"State"},{"latLng":{"lng":-100.445882,"lat":39.78373},"adminArea4":"","adminArea5Type":"City","adminArea4Type":"County","adminArea5":"","street":"","adminArea1":"US","adminArea3":"","type":"s","displayLatLng":{"lng":-100.445884,"lat":39.783729},"linkId":31198468,"postalCode":"","sideOfStreet":"N","dragPoint":false,"adminArea1Type":"Country","geocodeQuality":"COUNTRY","geocodeQualityCode":"A1XXX","adminArea3Type":"State"}],"hasCountryCross":false,"legs":[{"hasTollRoad":false,"index":0,"roadGradeStrategy":[[]],"hasHighway":true,"hasUnpaved":false,"distance":1468.1251,"time":94504,"origIndex":2,"hasSeasonalClosure":false,"origNarrative":"Go northeast on CA-84/Woodside Rd.","hasCountryCross":false,"formattedTime":"26:15:04","destNarrative":"","destIndex":-1,"maneuvers":[{"signs":[],"index":0,"maneuverNotes":[],"direction":3,"narrative":"","iconUrl":"http://content.mapquest.com/mqsite/turnsigns/icon-dirs-start_sm.gif","distance":0.082,"time":24,"linkIds":[],"streets":["Northumberland Ave"],"attributes":0,"transportMode":"AUTO","formattedTime":"00:00:24","directionName":"Northeast","mapUrl":"http://open.mapquestapi.com/staticmap/v4/getmap?key=Fmjtd|luu72duynd,bg=o5-5y820&type=map&size=225,160&pois=purple-1,37.46899,-122.219741,0,0|purple-2,37.470008,-122.21897799999999,0,0|&center=37.469499,-122.2193595&zoom=13&rand=124476137&session=559c2c2c-002a-0017-02b7-375b-00163e14b96a","startPoint":{"lng":-122.219741,"lat":37.46899},"turnType":0},{"signs":[],"index":1,"maneuverNotes":[],"direction":2,"narrative":"","iconUrl":"http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif","distance":0.253,"time":76,"linkIds":[],"streets":["Cypress St"],"attributes":0,"transportMode":"AUTO","formattedTime":"00:01:16","directionName":"Northwest","mapUrl":"http://open.mapquestapi.com/staticmap/v4/getmap?key=Fmjtd|luu72duynd,bg=o5-5y820&type=map&size=225,160&pois=purple-2,37.470008,-122.21897799999999,0,0|purple-3,37.472026,-122.222816,0,0|&center=37.471017,-122.220897&zoom=12&rand=124476137&session=559c2c2c-002a-0017-02b7-375b-00163e14b96a","startPoint":{"lng":-122.218978,"lat":37.470008},"turnType":6},{"signs":[{"text":"84","extraText":"","direction":0,"type":504,"url":"http://icons.mqcdn.com/icons/rs504.png?n=84"}],"index":2,"maneuverNotes":[],"direction":3,"narrative":"","iconUrl":"http://content.mapquest.com/mqsite/turnsigns/rs_right_sm.gif","distance":1.188,"time":120,"linkIds":[],"streets":["CA-84","Woodside Rd"],"attributes":128,"transportMode":"AUTO","formattedTime":"00:02:00","directionName":"Northeast","mapUrl":"http://open.mapquestapi.com/staticmap/v4/getmap?key=Fmjtd|luu72duynd,bg=o5-5y820&type=map&size=225,160&pois=purple-3,37.472026,-122.222816,0,0|purple-4,37.487186,-122.214035,0,0|&center=37.479606000000004,-122.2184255&zoom=9&rand=124476137&session=559c2c2c-002a-0017-02b7-375b-00163e14b96a","startPoint":{"lng":-122.222816,"lat":37.472026},"turnType":2},{"signs":[],"index":3,"maneuverNotes":[],"direction":8,"narrative":"","iconUrl":"http://content.mapquest.com/mqsite/turnsigns/rs_gr_exitright_sm.gif","distance":0.479,"time":42,"linkIds":[],"streets":[],"attributes":0,"transportMode":"AUTO","formattedTime":"00:00:42","directionName":"East","mapUrl":"http://open.mapquestapi.com/staticmap/v4/getmap?key=Fmjtd|luu72duynd,bg=o5-5y820&type=map&size=225,160&pois=purple-4,37.487186,-122.214035,0,0|purple-5,37.487457,-122.20588599999999,0,0|&center=37.4873215,-122.2099605&zoom=11&rand=124476137&session=559c2c2c-002a-0017-02b7-375b-00163e14b96a","startPoint":{"lng":-122.214035,"lat":37.487186},"turnType":14},{"signs":[{"text":"101","extraText":"","direction":8,"type":2,"url":"http://icons.mqcdn.com/icons/rs2.png?n=101&d=EAST"},{"text":"84","extraText":"","direction":0,"type":3,"url":"http://icons.mqcdn.com/icons/rs3.png?n=84"}],"index":4,"maneuverNotes":[],"direction":8,"narrative":"","iconUrl":"http://content.mapquest.com/mqsite/turnsigns/rs_merge_right_sm.gif","distance":1.128,"time":65,"linkIds":[],"streets":["US-101 E","SR 84","Bayshore Fwy"],"attributes":128,"transportMode":"AUTO","formattedTime":"00:01:05","directionName":"East","mapUrl":"http://open.mapquestapi.com/staticmap/v4/getmap?key=Fmjtd|luu72duynd,bg=o5-5y820&type=map&size=225,160&pois=purple-5,37.487457,-122.20588599999999,0,0|purple-6,37.484733,-122.18562999999999,0,0|&center=37.486095,-122.19575799999998&zoom=10&rand=124476137&session=559c2c2c-002a-0017-02b7-375b-00163e14b96a","startPoint":{"lng":-122.205886,"lat":37.487457},"turnType":10},{"signs":[{"text":"406","extraText":"","direction":0,"type":1001,"url":"http://icons.mqcdn.com/icons/rs1001.png?n=406&d=RIGHT"}],"index":5,"maneuverNotes":[],"direction":5,"narrative":"","iconUrl":"http://content.mapquest.com/mqsite/turnsigns/rs_gr_exitright_sm.gif","distance":0.274,"time":40,"linkIds":[],"streets":[],"attributes":0,"transportMode":"AUTO","formattedTime":"00:00:40","directionName":"Southeast","mapUrl":"http://open.mapquestapi.com/staticmap/v4/getmap?key=Fmjtd|luu72duynd,bg=o5-5y820&type=map&size=225,160&pois=purple-6,37.484733,-122.18562999999999,0,0|purple-7,37.482475,-122.18186899999999,0,0|&center=37.483604,-122.18374949999999&zoom=12&rand=124476137&session=559c2c2c-002a-0017-02b7-375b-00163e14b96a","startPoint":{"lng":-122.18563,"lat":37.484733},"turnType":14},{"signs":[{"text":"84","extraText":"","direction":0,"type":504,"url":"http://icons.mqcdn.com/icons/rs504.png?n=84"}],"index":6,"maneuverNotes":[],"direction":1,"narrative":"","iconUrl":"http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif","distance":0.319,"time":32,"linkIds":[],"streets":["CA-84","Marsh Rd"],"attributes":128,"transportMode":"AUTO","formattedTime":"00:00:32","directionName":"North","mapUrl":"http://open.mapquestapi.com/staticmap/v4/getmap?key=Fmjtd|luu72duynd,bg=o5-5y820&type=map&size=225,160&pois=purple-7,37.482475,-122.18186899999999,0,0|purple-8,37.486346999999995,-122.17896999999999,0,0|&center=37.484410999999994,-122.1804195&zoom=11&rand=124476137&session=559c2c2c-002a-0017-02b7-375b-00163e14b96a","startPoint":{"lng":-122.181869,"lat":37.482475},"turnType":6},...

Any ideas, anyone?


MQBrianCoakley
The geocode quality code will
The geocode quality code will indicate how accurate the result is. You can see the A1XXX quality code above indicating that a country was found. The open geocoder is based on a Nominatim search. The Open Street Map version of Nominatim doesn't find the address either. I suspect that if the buildings are entered into the OSM data that results will be better.

brucesteinback@...
Unimpressed

Well, I can see why nobody uses MQ programmatically. Either you pay a fortune, or you get silently shunted off to a 2nd rate site that has nothing to do with MQ. I'm not sure this does me any good, since I'm trying to make an app for people who are reporting to an organization that requires MQ mileage, so thanks for nothing (not you personally, MQ).

Just out of curiosity, how does one add locations to this Open Source map, and why doesn't it have multiple courthouses in the San Francisco Bay area? Those would seem obvious things to have in any map.

 


MQBrianCoakley
You can sign up for an OSM
You can sign up for an OSM account here. Then you can use the OSM tools or MapQuest's Potlatch to modify data and add locations.