Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Osm geo changes #259

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

ddvorscak
Copy link

Hi,

I made some changes that i find useful to have. Often It is useful to know what problem happened in request that is made. Like if want to make route request and currently there is no internet connection or server is not reachable so user can be properly informed about problem. second change is more detailed Address info returned in geocoding/reversegeocoding.

So changes are:

  • in HttpConnection class doGet method now throws IOException if there is problem with internet connection and StatusException if there si some problem other then internet connection. StatusException class contains method getHttpStatusCode() that returns http status code for more details about problem. This offers more details about communication problems. This caused that all request methods that uses HttpConnection.doGet() had to throw this exceptions.
  • in GeocoderNominatim class method buildAndroidAddress supported new tags from OSM. Setting of street address using tag "road" have added fallbacks to values with tags: "pedestrian", "footway", "cycleway", "bridleway", "highway", "address26". Tag "county" has set fallback value to tag "departement". Tag "state" has set fallback value to tag "region".
    Tag "house_number" set now in Address object with setSubThoroughfare() (since in documentations says: "This may correspond to the street number of the address") among others that are set mostly in Address extras Bundle. It is useful to have more address details espectialy in some countries where different tags are used. Some of tags added in Address extras if they exsist in response: "place_id", "type", "licence", "city", "town", "village", "subway", "golf_course", "bus_stop", "parking", "house", "building", "city_district", "pedestrian", "footway", "highway", "sub-city", "locality", "isolated_dwelling",  "cycleway", "hamlet", "region", "departement", "neighbourhood", "residential".

Damir Dvorscak added 8 commits October 21, 2016 12:14
- in HttpConnection class doGet method now throws IOException if there is problem with internet connection and StatusException if there si some problem other then internet connection. StatusException class contains method getHttpStatusCode() that returns http status code for more detals about problem. This offers more detals about communicaiton problems. This caused that all request methods that uses HttpConnection.doGet() had to throw this exceptions.

- in GeocoderNominatim class method buildAndroidAddress supported new tags from OSM. Setting of street address using tag "road" have added fallbacks to values with tags: "pedestrian", "footway", "cycleway", "bridleway", "highway", "address26". Tag "county" has set fallback value to tag "departement". Tag "state" has set fallback value to tag "region".
Tag "house_number" set now in Address object with setSubThoroughfare() (since in documentations says: "This may correspond to the street number of the address") among others that are set mostly in Address extras Bundle. It is useful to have more address details espectialy in some countries where different tags are used. Some of tags added in Address extras if they exsist in response: "place_id", "type", "licence", "city", "town", "village", "subway", "golf_course", "bus_stop", "parking", "house", "building", "city_district", "pedestrian", "footway", "highway", "sub-city", "locality", "isolated_dwelling",  "cycleway", "hamlet", "region", "departement", "neighbourhood", "residential".
- warnings fixes (improvements made)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant