Obtaining accurate address info by reverse geocoding

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Obtaining accurate address info by reverse geocoding

Postby androidian » Sun Jan 18, 2009 3:43 pm

I'm trying to get the street address and/or address's feature name of the user's current physical location. If the user is at home, it should return their street address, but if they're in a shopping mall I'd expect any of a number of shops or the mall as a whole depending on which specific locations the google maps database contains.

I'm just wondering if the reverse geocoding that is taking place in the android location API is somehow different (or uses slightly different address data sources) to that of Google Maps. I wonder this because I can reproduce the following scenario:

- I can find a house by browsing on this map: http://code.google.com/apis/maps/docume ... verse.html and the popup message tells me the correct house number, street, suburb etc, as well as the latitude and longitude. An example is

- I then put the latitude and longitude into the GPS simulator in the Android DDMS and send it to the device.

- I make a call to locationManager.getLastKnownLocation("gps") and from the latitude and longitude I call geocoder.getFromLocation(latitude, longitude, 5) to get all the possible addresses, or at least the top 5, for that location.

The top 5 results always step back in terms of detail, e.g. first result gives street, suburb, postcode, state, country; second gives suburb, postcode, state and country; third just gives postcode, state and country; fourth gives state and country and fifth just gives country.

The problems I have with the results are
1. In no examples that I've tried can I get a house number returned. Most times it's the correct street, suburb etc.

2. Sometimes, if it's a house at the intersection of two streets, it'll give the wrong street, and none of the top 5 results are the correct one. Remember, google maps has given the correct address and coordinates.

3. If I search on google maps (or google earth) for a feature such as a shopping mall, it finds it and marks it on the map. So it has coordinates for the shopping mall. Again, if I use those coordinates in the android simulator, I get the suburb etc, but no feature name (via getFeatureName() or any street information).

If it wasn't for the fact that google maps clearly has this information, I think I'd be asking too much. Does anyone have any idea if the android location API is capable of what I need, or should I turn to the Google Maps API? Any help appreciated.
androidian
Junior Developer
Junior Developer
 
Posts: 10
Joined: Sat Oct 25, 2008 3:51 pm

Top

Yup, same problem :(

Postby ralphie » Wed Jan 21, 2009 6:16 am

We discussed a bit at the end of this thread...

http://www.anddev.org/viewtopic.php?p=14771

I did see that a similar issue was reported to google, so I have no reason not to believe that it's a real problem.

http://code.google.com/p/android/issues/detail?id=913
ralphie
Freshman
Freshman
 
Posts: 4
Joined: Wed Nov 12, 2008 5:45 am
Location: Bay Area, CA

Postby androidian » Wed Jan 21, 2009 7:07 am

Thanks very much for your reply. It looks (from this and other sources) like the reverse geocoding is not fully working in android yet. I think the data source they're using for these lookups may be a mock location database. Here's hoping it gets fully implemented soon.
androidian
Junior Developer
Junior Developer
 
Posts: 10
Joined: Sat Oct 25, 2008 3:51 pm

Postby andmol » Thu Jan 22, 2009 12:29 am

The Google Maps API supports reverse geocoding since a few weeks. Maybe this is of any help, see here.
andmol
Junior Developer
Junior Developer
 
Posts: 21
Joined: Tue Sep 30, 2008 5:34 pm

Postby androidian » Thu Jan 22, 2009 1:06 am

Yep I know the Google Maps API supports reverse geocoding, but given that you need an API key for that, I'm not sure of the legalities or what would be required, i.e. would every instance of the app need a separate API key? In any case Android is clearly not the intended platform for this API given that android has its own location/maps API, so I think I'll just "comment out" my location functionality for now and wait to see if the reverse geocoding works better in the next android release.
androidian
Junior Developer
Junior Developer
 
Posts: 10
Joined: Sat Oct 25, 2008 3:51 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 2 guests