docs: public static boolean isArea(Way way) {
          boolean result = true;
          if (way.getTags() != null) {
              for (Tag tag : way.getTags()) {
                  String key = tag.getKey().toLowerCase(Locale.ENGLISH);
                  String value = tag.getValue().toLowerCase(Locale.ENGLISH);
                  if ("area".equals(key)) {
                      // obvious result
                      if (("yes").equals(value) || ("y").equals(value) || ("true").equals(value)) {
                          return true;
                      }
                      if (("no").equals(value) || ("n").equals(value) || ("false").equals(value)) {
                          return false;
                      }
                  }
                  // as specified by http://wiki.openstreetmap.org/wiki/Key:area
                  if ("aeroway".equals(key) || "building".equals(key) || "landuse".equals(key) || "leisure".equals(key) || "natural".equals(key) || "amenity".equals(key)) {
                      return true;
                  }
                  if ("highway".equals(key) || "barrier".equals(key)) {
                      // false unless something else overrides this.
                      result = false;
                  }
                  if ("railway".equals(key)) {
                      // there is more to the railway tag then just rails, this excludes the
                      // most common railway lines from being detected as areas if they are closed.
                      // Since this method is only called if the first and last node are the same
                      // this should be safe
                      if ("rail".equals(value) || "tram".equals(value) || "subway".equals(value)
                              || "monorail".equals(value) || "narrow_gauge".equals(value) || "preserved".equals(value)
                              || "light_rail".equals(value) || "construction".equals(value)) {
                          result = false;
                      }
                  }
              }
          }
          return result;
      }