OpenTripPlanner-for-Android icon indicating copy to clipboard operation
OpenTripPlanner-for-Android copied to clipboard

Organize and uniform geocoding results

Open vreixo opened this issue 10 years ago • 4 comments

Android Geocoder results are completely organized by fields and also MapQuest can be with the parameter addressDetails, for example http://open.mapquestapi.com/nominatim/v1/search?format=xml&q=Maria%20Pita&addressdetails=1.

The only provider which is not organized by fields afaik is Google Places, but results seem to be very consistent https://maps.googleapis.com/maps/api/place/textsearch/xml?query=Maria%20Pita&key=AIzaSyC8Vzn5Fi8IzqA_5B2ay_STGTUrhwlWnpw, so we can use all until the last comma (I think that is counterproductive for our app to display the country) and we will get a correct address.

The point is that with the actual process of retrieve the display_name field in a request for nominatim we can get the feature name which may be the name of a hotel and will be totally incorrect. Also zip code and that kind of data I think that should be discarded.

vreixo avatar Aug 27 '14 19:08 vreixo

@barbeau at this point I'm not quite sure if will be best to supply a feature name or just addresses after the discussion in #357, I even think that is better to have the feature name. Also with the detailed address parameter, addresses details don't seem very easy to parse, specifically to get the feature name, because there isn't such element, instead there are , , or whatever is the type of node, but we don't have a common node name to use. So, I'm afraid that until Google Places won't give break down addresses and Nominatim a clear feature name won't be possible to make this better.

vreixo avatar Aug 27 '14 22:08 vreixo

@vreixo by feature name do you mean "street"? If so, can you get the OSM tagging for the way via OTP API?

barbeau avatar Aug 27 '14 23:08 barbeau

I mean the type of facility that is on that address, for example "McDonals", "Tampa Hospital", "Library", etc. In Google Places you can see "McDonalds" as name and in another field the address "Independence street, 5, Michigan", in Nominatim name and address are together like "McDonalds, Independence street, 5, Michigan".

vreixo avatar Aug 28 '14 11:08 vreixo

Ah, OK. Yes, not much we can do about that.

barbeau avatar Aug 28 '14 11:08 barbeau