2

I am making an android app. Is it possible to check if a user (given some coordinates) is facing a street and if that street is within 10-20ft away?

If not, is there an open source map which I can "tread" through manually using code/coordinates to see if there is a nearby "street"? I want to make a navigation system for the blind and I need some way to check if the user is standing on the middle of the street.

Thanks, Rohit

Kara
  • 6,115
  • 16
  • 50
  • 57
rkrishnan2012
  • 368
  • 1
  • 2
  • 13

1 Answers1

1

You'll want to read up on the Google Maps Geocoding API:

http://code.google.com/apis/maps/documentation/geocoding/

If you're on Android, there's a special Geocoder class that will call Google Maps for you:

Geocoder geocoder = new Geocoder(this, Locale.getDefault());
List<Address> addresses = geocoder.getFromLocation(lat, lng, 1);

(Source: Android: Reverse geocoding - getFromLocation)

The catch is that this just going to give the most likely address for the user's current location -- you don't get to specify a fuzz factor or anything like that. Even then, 10-20 ft. should be close enough for this to match.

If this doesn't get you the data you need, you might also want to look at OpenStreetMap, which is an open maps database. I don't have much experience with it myself, but there's documentation here: http://wiki.openstreetmap.org/wiki/Main_Page

Community
  • 1
  • 1
Trevor Johns
  • 15,682
  • 3
  • 55
  • 54
  • Is there a way to get an array of coordinates which correspond to the street path? SO I can compare them to the current position? – rkrishnan2012 Dec 29 '11 at 20:45
  • You can convert a single address into a lat/long pair ("reverse geocoding"), but the Google APIs won't let you do this for an entire street. – Trevor Johns Dec 29 '11 at 20:55