Different placeID gives the same address information - google-maps

Below two placeID's gives the same address.
1. EicyMDEgU291dGggTG93cnkgU3RyZWV0LCBTbXlybmEsIFROLCBVU0EiMRIvChQKEgm7_A4lPAxkiBEptR2cpqTb1xDJASoUChIJT4MxvQIMZIgRENDVZ6XiGTc
2. ChIJBbYyJDwMZIgR1TtBueaig5w
PlaceID1 was returned when the address searched using the autocomplete was " 201 South Lowry Street" and PlaceID2 was returned when the address searched using the autocomplete was " Goodwill Industries of Middle Tennessee 201 South Lowry Street".
Even though the above addresses are different, the place details API gives the same address information.
https://maps.googleapis.com/maps/api/place/details/json?place_id=EicyMDEgU291dGggTG93cnkgU3RyZWV0LCBTbXlybmEsIFROLCBVU0EiMRIvChQKEgm7_A4lPAxkiBEptR2cpqTb1xDJASoUChIJT4MxvQIMZIgRENDVZ6XiGTc&key=API_KEY
https://maps.googleapis.com/maps/api/place/details/json?place_id=ChIJBbYyJDwMZIgR1TtBueaig5w&key=API_KEY
Question :
1. Why is the same address which is of the street returned for two different placeID's?
2. The location returned by places Details API is correct but the address is of the street.
Below are few more examples where I observed same scenarios. Could you please brief on the below mentioned examples also?
PlaceID : ChIJZ2fZgcNVZIgRRY-uzGW9IBc and ChIJi15Hp8RVZIgRojWuKm_aG3M returned the same address as "2008 Memorial Boulevard Springfield Tennessee United States 37172", but the straight line distance between the two places is approximately 154 meters.
PlaceID : EiBBbm5leCBBdmVudWUsIE5hc2h2aWxsZSwgVE4sIFVTQSIuKiwKFAoSCd8ldk-TYWSIEZbufa-nQvmSEhQKEgk9kOsTMuxkiBGg2umh0Lk_fQ and ChIJ9ynrOIthZIgR-_7_cmwzeXo returned the same address as "3736, Annex Avenue Nashville Tennessee 37209" , but the straight line distance between the two places is approximately 6.92 meters.
PlaceID : ChIJTZvXpuJ7ZIgR8GqA7eDu5oY and ChIJ3ZUKweJ7ZIgRBjj8OqdMm5E returned the same address as "1777, Galleria Boulevard Franklin Tennessee 37067 " , but the straight line distance between the two places is approximately 12.24 meters.
PlaceID : EicyMDEgU291dGggTG93cnkgU3RyZWV0LCBTbXlybmEsIFROLCBVU0EiMRIvChQKEgm7_A4lPAxkiBEptR2cpqTb1xDJASoUChIJT4MxvQIMZIgRENDVZ6XiGTc and ChIJBbYyJDwMZIgR1TtBueaig5w returned the same address as "201 S Lowry St, Smyrna, TN 37167, United States " , but the straight line distance between the two places is approximately 97 meters.

Please note that it's possible for each place or feature to have similar addresses. This is why the Places API used Place IDs instead to uniquely identify the place/feature. As per this doc:
Place IDs uniquely identify a place in the Google Places database and
on Google Maps.
Below is my investigation on the addresses you have mentioned:
The place ID, ChIJZ2fZgcNVZIgRRY-uzGW9IBc, is of type, premise. As per the Address Types doc here:
Premise indicates a named location, usually a building or collection
of buildings with a common name.
If you think that a collection of building should not have the same address as the Place ID, ChIJi15Hp8RVZIgRojWuKm_aG3M, then I suggest that you report this Maps Data issue. (I'll put some more details on how to report Maps Data issues below)
The address returned for EiBBbm5leCBBdmV...iBGg2umh0Lk_fQ is an address of a route (Annex Ave, Nashville, TN 37209, USA), which is not the same as the the second Place ID's (ChIJ9ynrOIthZIgR-_7_cmwzeXo) address (3734 Annex Ave, Nashville, TN 37209, USA).
For the Item #3, what I can see is that the place ChIJTZvXpuJ7ZIgR8GqA7eDu5oY is a street_address while the other feature (ChIJ3ZUKweJ7ZIgRBjj8OqdMm5E) is a point_of_interest. These two features does not seem to be related so I believe that this is another Maps Data issue which can also be reported.
The feature, EicyMDEgU29...ENDVZ6XiGTc, on the other hand appears to be an inferred street address from a range of addresses. While the place, ChIJBbYyJDwMZIgR1TtBueaig5w, is the actual point_of_interest that's on that same street address. Note that the point of interest may close or move to a new location, but, the street address most likely won't change.
For Maps Data issues, this can be reported using the "Report a
Problem" or "Send feedback" link on the bottom right corner on
maps.google.com or in the Google Maps for Mobile Application. To learn
more, please see this guide. But for Maps Data that are added
using Google My Business, this can be modified directly by the
business owners themselves on their Google My Business account.
I hope this helps!

Related

Best practice for AKA addresses

Using geocode api to get location data and full address details from an address string. This address string might include the property name, city and state or an actual street address. Been using for years with good results. Some buildings, particularly in cities like NY, use multiple addresses. Although the maps pin is in the same location, these equivalents return different coordinates and are not equivalent. Willis Tower, Chicago IL, is the same as 233 S Wacker Dr, Chicago, IL...but not exactly.
Queries are simple...In python...
GMAPS = googlemaps.Client(key=settings.MAPS_TOKEN)
res =GMAPS.geocode(address text string with building name or street address)
with the res, I pull out city,state,county,long,lat...
Is there a technique for identifying equivalence for buildings that have one structure, but multiple possible addresses

Google Maps Autocomplete doesn't include postcodes in address search

For my current project, I have an address lookup for the user to enter an address. In its default state, its results are too ambiguous, and the lookup returns all locations even if it isn't actually an address (eg some of the locations in the list are an entire city or region).
Adding types: ['address'] to the query has solved this; Google now only responds with actual addresses instead of ambiguous regions, however this has lost us the ability to search via postcode, as these two fiddles demonstrate:
http://jsfiddle.net/yj6qvpsg/2/ will list entire cities and regions (bad), but you can still search for an address with a UK postcode (good).
http://jsfiddle.net/yj6qvpsg/1/ will only list addresses (good), but won't search UK postcodes (bad).
How do we get the best of both worlds? I tried playing around with eg, types: ['address', 'postal_code'], but had no luck...
So it turns out that it's only really in the UK that postcodes are tied to physical addresses at street level (you can literally give the house number and postcode as a complete and valid address), while in the rest of Europe a postcode represents a whole region, hence Google considers postcodes as regions throughout.
Maybe one day they'll make an exception for the UK, but in the mean time an alternative if you really need this feature is probably to look at something like: https://getaddress.io/ which might suck if like us your entire data structure is built to match Google's
This came up as the top result for this question, but is massively outdated.
So for anyone looking for a more in-depth search, set Google's Autocomplete to geocode and you can search by:
Street name
District
Town
City
Postcode
Ace!

check if a place is within an area (place_id)

I have a google maps place defined by their place_id s.
The place can refer to:
an address, eg 221B Baker St, Marylebone, London NW1 6XE, UK : ChIJFbp6NM8adkgRdOYUaV-EQlw
Or a general area eg London NW1, UK: ChIJoZM_S7EadkgR_T2MfOBVirE
I would like to know, using google maps API, whether a given address is inside the previous area or near the previously defined address (distance can be defined as a birth flight distance from the previous place).
You can use place IDs as origins and destinations in the Google Distance Matrix API. So, you can use your place ID as an origin and the address you want to test as the destination. Call the API to determine the distance. I think this was an update in 2017 maybe, see: https://developers.google.com/maps/documentation/distance-matrix/intro#RequestParameters

Get Latitude / Longitude from Address with Accuracy

I know this question has been asked too many times but my question is more of about standard approach.
I do have following fields in my form and using all of them for concatenation and sending to the Google Maps Api for fetching address which works.
But for some address Google Maps Api gives wrong lat/long due to the values insertion. fields with values are mentioned below.
Fields :
Street Address 1 - SHOP NO 56
Location - Sector 14
State - Haryana
City - Gurgaon
Resulting Google Map Url is giving me Lat/long of Sector 56 rather than Sector 14. Almost 9 Kms Difference.
http://maps.google.com/maps/api/geocode/json?address=Shop+No+56,Sector+14,Haryana,Gurgaon,IN
Can anybody please help me in this ?
What I tried/thought
I was planning to use Only Location Field but I suspect that will not help much.
It's true, businesses are excluded from Geocoding API. If you need a location for certain business just use the Places API.
E.g.
https://maps.googleapis.com/maps/api/place/textsearch/json?query=Shop%20No%2056%2C%20Sector%2014%2C%20Haryana%2C%20Gurgaon%2C%20IN&key=YOUR_API_KEY

Regions of England in Google Maps API

I have a list of latitude/longitude which point to some cities in England.
For each of these coordinates I want to get the region they belong to.
By region, I mean one of these: https://en.wikipedia.org/wiki/Regions_of_England
For instance: For coordinates (53.38112, -1.47008), ie. Sheffield, I need to find Yorkshire and the Humber.
To achieve this, I tried to use Google Reverse Geocoding API:
https://maps.googleapis.com/maps/api/geocode/json?latlng=53.38112,-1.47008&key=
Google then tells me that:
country is United Kingdom
administrative_area_level_1 is England, which is a State (or kind of)
administrative_area_level_2 is South Yorkshire, which is a County
administrative_area_level_3 is Sheffield District, which is a District
So Google returns me the correct State, County and District. However, Region is missing.
Is there any way to obtain it?
Looking at the documentation I don't think the Google API returns such information.
An alternative way to get round this would be to build a list of which counties belong in which of the 9 regions and then look up the region based on the county name. Obviously, this would be a bit of work on your part putting all the county names into a list.
While this doesn't directly answer your query, you could use a set of polygons which trace the regions and a point in polygon algorithm (this example is in PHP but the algorithm exists in many languages) which would allow you to check which of the regions any latitude and longitude is in