none
how to prevent bad addresses from being accepted? RRS feed

  • Question

  • I am doing a simple distance query between two addresses.

    For a test I entered: 106 South Main St, Timoniam, MD 21152

    This is a non-existing street name, a none-existing City, and the wrong zip for the city.

    The api somehow figures out a distance? To what I wonder?

    When I go to the website this bum address translates to 106 S Main St. Bel Air MD 21014?

    What is the appropriate method to gain certainty, and that a bum address gets rejected?

    Sunday, March 29, 2015 1:15 AM

Answers

  • What the API does, when it can't find an address, is moves up the hierarchy of the address. If you pass in a bad street address, it will search just for the street, if the street is not valid it will then search for the city and so on until it gets to the country level.

    What you can do to ensure that only street addresses are used, is geocode each end point and look at the match code, confidence and the entity type information that are returned by the geocoder. https://msdn.microsoft.com/en-us/library/ff701725.aspx

    Looking at the geocoder response when geocoding "106 South Main St, Timoniam, MD 21152" we see the following:

    • Match Code: Good, UpHierarchy
    • Confidence: Medium
    • Entity Type:  PopulatedPlace

    http://rbrundritt.wordpress.com

    Monday, March 30, 2015 4:21 PM

All replies

  • What the API does, when it can't find an address, is moves up the hierarchy of the address. If you pass in a bad street address, it will search just for the street, if the street is not valid it will then search for the city and so on until it gets to the country level.

    What you can do to ensure that only street addresses are used, is geocode each end point and look at the match code, confidence and the entity type information that are returned by the geocoder. https://msdn.microsoft.com/en-us/library/ff701725.aspx

    Looking at the geocoder response when geocoding "106 South Main St, Timoniam, MD 21152" we see the following:

    • Match Code: Good, UpHierarchy
    • Confidence: Medium
    • Entity Type:  PopulatedPlace

    http://rbrundritt.wordpress.com

    Monday, March 30, 2015 4:21 PM
  • Thanks for your reply Ricky.

    Entity type: populated place is not one of the classifications given.

    If I need to eventually get a distance, what entity type should I be looking for?

    Tuesday, March 31, 2015 1:44 AM
  • Address, Road, RoadBlock will be fairly accurate.

    http://rbrundritt.wordpress.com

    Tuesday, March 31, 2015 3:59 PM