I am trying to build a an android application that can determine the type of highway the user is on by latitude and longitude coordinates. Is there a way to query overpass turbo to retrieve the type or classification of highway ?(whether it is motorway, trunk, primary, secondary, tertiary or residential) I was not able to find any relevant tutorials or documentation to do so. Can I implement a query in a Java class method as described below:
LocationManager lm(LocationManager)getSystemService(Context.LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
@Override public void onLocationChanged(Location location)
{
double longitude = location.getLongitude();
double latitude = location.getLatitude();
/*query overpass turbo to classify highway*/
/*store retrieved classification type as a string*/
}
And instead of fetching all ways tagged as highways around the given coordinate, can the current position be identified as to whether the way is which type of highway?