public static Double meters(Object tag) {
    if (tag != null) {
      if (tag instanceof Number num) {
        return num.doubleValue();
      }
      var str = tag.toString();
      var matcher = DISTANCE.matcher(str);
      if (matcher.find()) {
        try {
          double value = Double.parseDouble(matcher.group("value"));
          if (matcher.group("m") != null) {
            // value *= 1;
          } else if (matcher.group("km") != null) {
            value *= 1000d;
          } else if (matcher.group("mi") != null) {
            value *= 1609.344;
          } else if (matcher.group("nmi") != null) {
            value *= 1852d;
          } else if (matcher.group("ft") != null) {
            value *= 12 * 0.0254;
            // handle 15'3"
            if (matcher.find() && matcher.group("in") != null) {
              value += Double.parseDouble(matcher.group("value")) * 0.0254;
            }
          } else if (matcher.group("in") != null) {
            value *= 0.0254;
          } else {
            return null;
          }
          return value;
        } catch (NumberFormatException e) {
          return null;
        }
      }
    }
    return null;
  }
Parses {@code tag} as a measure of distance with unit, converted to a round number of meters or {@code null} if
invalid.
<p>
See <a href="https://wiki.openstreetmap.org/wiki/Map_features/Units">Map features/Units</a> for the list of
supported units.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/Parse.java