user2626877
user2626877

Reputation: 11

Geocoding using google API not give perfect Latitude,Longitude of address

If I enter below address into google map search box, then it will redirect me on exact place where it resides.

Address: Maruti Crystal,S.G. Highway,Opp Rajpath ClubAhmedabad, GJ 380059, India

But if I pass this address into google api using below url :-

http://maps.googleapis.com/maps/api/geocode/xml?address=Maruti Crystal,S.G. Highway,Opp Rajpath ClubAhmedabad, GJ 380059, India&sensor=false

then it will not give exact Geocode(lat,long) of that place in the response.

In response it will return me the geocode of location 23.0484263 72.5234406

It will give me geocode of ahmedabad only somewhere near Thaltej road ahmedabad.

But it is 6 K.M far from actual address.

My actual problem is that if google map able to show that exact location on map . why google API is not able to return exact Geocode of that location???

Upvotes: 0

Views: 779

Answers (2)

xpda
xpda

Reputation: 15813

The locations of some addresses in Google Maps and Google API are incorrect. You can report errors by clicking on the "Report a problem" link at the lower left of the Google Maps page.

Upvotes: 1

AK4VL
AK4VL

Reputation: 31

Have you tried other locations in the surrounding area for successful Geocoding?

I replicated your results and noticed that the location type is categorized as APPROXIMATE, which could indicate a lack of Geocoding data available to Google for that area. For my location, for example, I receive a location type of ROOFTOP.

From The Google Geocode API...

location_type stores additional data about the specified location. The following values are currently supported:

"ROOFTOP" indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision.

"RANGE_INTERPOLATED" indicates that the returned result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address.

"GEOMETRIC_CENTER" indicates that the returned result is the geometric center of a result such as a polyline (for example, a street) or polygon (region).

"APPROXIMATE" indicates that the returned result is approximate.

Upvotes: 1

Related Questions