Issue with google geocode API : Getting "partial_match" in response
Asked Answered
F

2

6

I am using google Geocode API to get the lat long of particular address.

when I am searching for "364 S Side Square, Carlinville, IL 62626, USA" in google search or google maps it gives the accurate pin point on google search result or maps result.

but same time when i am searching the same address using Geocode API using below request call, it gives "partial_match" : true

http://maps.googleapis.com/maps/api/geocode/json?address=364 S Side Square, Carlinville, IL 62626, USA&sensor=false

any one knows why it gives "partial_match" : true in response ?

what changes i have to do in the API request so that i won't get "partial_match" ?

Freeness answered 6/12, 2017 at 5:43 Comment(0)
B
7

To understand the nature of the partial match flag for the '364 S Side Square, Carlinville, IL 62626, USA' let's have a look at this address in geocoder tool:

https://google-developers.appspot.com/maps/documentation/utils/geocoder/#q%3D364%2520S%2520Side%2520Square%252C%2520Carlinville%252C%2520IL%252062626%252C%2520USA

Indeed, the search string and formatted address in the result are exactly the same, however, we have to pay attention to other values like location_type and place_id

enter image description here

As you can see the location type is RANGE_INTERPOLATED and the place ID has a long value Ei0zNjQgUyBTaWRlIFNxdWFyZSwgQ2FybGludmlsbGUsIElMIDYyNjI2LCBVU0E. This means Google doesn't have an exact address feature in their database and tries to interpolate where this address might be located. In case if address exists in the Google database, you will see a location type ROOFTOP and a shorter place ID (something similar to ChIJrTLr-GyuEmsRBfy61i59si0).

Resuming aforementioned, the partial match flag in your example indicates that exact street address feature doesn't exist in the Google database.

This also can be confirmed by the following sentence in the documentation:

Partial matches most often occur for street addresses that do not exist within the locality you pass in the request.

https://developers.google.com/maps/documentation/geocoding/intro#GeocodingResponses

You also have an option to report a missing address to Google following the help center:

https://support.google.com/maps/answer/6320846

I hope my answer addresses your doubt!

Byproduct answered 7/12, 2017 at 10:29 Comment(5)
do you mean to say that this address doesn't exist in google database ? how can i overcome this partial_match issue ?Freeness
You should report a missing address. Once Google adds it in their database, the partial match will disappear.Byproduct
If this address doesn't exist in google database then how google web search gives the exact pin point in it's result ??Freeness
Google gives out an interpolated position. They say something like "ok, we think this address should be here, but we don't have an exact feature for it". The address that you see in geocoder tool was synthesized from street data, but not found directly in the database. Therefore the partial match flag and the only option to remove this partial match flag is request Google to add the exact address feature in their database.Byproduct
Just to give an example to further illustrate this: searching an address with street name 15ieme avenue will give a partial match, but 15e avenue will not. That's because the address is registered in the database with 15e Av and the API does not recognize that 15ieme is a longer kinda slang for 15e. Hope that helps!Downspout
A
1

partial_match indicates that the geocoder did not return an exact match for the original request, though it was able to match part of the requested address. You may wish to examine the original request for misspellings and/or an incomplete address.

Partial matches most often occur for street addresses that do not exist within the locality you pass in the request. Partial matches may also be returned when a request matches two or more locations in the same locality. For example, "21 Henr St, Bristol, UK" will return a partial match for both Henry Street and Henrietta Street. Note that if a request includes a misspelled address component, the geocoding service may suggest an alternative address. Suggestions triggered in this way will also be marked as a partial match.

try place_id which is unique identifier

Antiquity answered 6/12, 2017 at 11:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.