private static Address osmToAddress(final JsonNode osmAddress) {
        final Address address = new Address(Locale.getDefault());
        final JsonNode add = osmAddress.get("address");
        set(add, address::setLocality, "city", "village", "town");
        set(add, address::setPostalCode, "postcode");
        set(add, address::setAdminArea, "state");
        set(add, address::setSubAdminArea, "county");
        set(add, data -> address.setCountryCode(data.toUpperCase(Locale.ROOT)), "country_code");
        set(add, address::setCountryName, "country");
        set(add, address::setSubLocality, "neighbourhood");

        address.setLatitude(osmAddress.get("lat").asDouble());
        address.setLongitude(osmAddress.get("lon").asDouble());

        int index = 0;
        for (final String addressComponent : new String[]{add.path("road").asText(), address.getSubLocality(), address.getLocality(),
                address.getPostalCode(), address.getSubAdminArea(), address.getAdminArea(), address.getCountryName()}) {
            if (StringUtils.isNotBlank(addressComponent)) {
                address.setAddressLine(index++, addressComponent);
            }
        }
        return address;
    }
Retrieve the physical address for coordinates. The work happens on the network scheduler.

@param coords the coordinates
@return an observable containing one location or an error
main/src/main/java/cgeo/geocaching/address/OsmNominatumGeocoder.java