Interpret Google Geocoding API Response returned to know which of them are accurate -


we have program calls google geocoding api passing address. understand of address, latitude , longitude values correct , of them approximated.

in response, there tags address_component can have multiple "type" tag. there location_type under 'geometry'-->'location'

there 'type' directly 'result'

we going following logic understand if lat , long accurate.

check multiple "type" under "address_components" , if find either value "route" or "street_number" in of type tags, accurate.. should use anyother tags geocoder response "location_type" under "location" or "type" under "result" tags.

there information on google geocoding info, did not figure out if there kind of logic apply.

regards siva

the location_type tells accuracy of result, partial match tells geocoder did not return exact match request.

see documentation: results: location_type/partial match

  • geometry contains following information:
    • location contains geocoded latitude,longitude value. normal address lookups, field typically important.
    • location_type stores additional data specified location. following values supported:
      • "rooftop" indicates returned result precise geocode have location information accurate down street address precision.
      • "range_interpolated" indicates returned result reflects approximation (usually on road) interpolated between 2 precise points (such intersections). interpolated results returned when rooftop geocodes unavailable street address.
      • "geometric_center" indicates returned result geometric center of result such polyline (for example, street) or polygon (region).
      • "approximate" indicates returned result approximate.
  • partial_match indicates geocoder did not return exact match original request, though able match part of requested address. may wish examine original request misspellings and/or incomplete address. partial matches occur street addresses not exist within locality pass in request. partial matches may returned when request matches 2 or more locations in same locality. example, "21 henr st, bristol, uk" return partial match both henry street , henrietta street. note if request includes misspelled address component, geocoding service may suggest alternative address. suggestions triggered in way marked partial match.

Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -