private static <T extends Unit> Map<String, T> index(T[] values) {
    return Arrays.stream(values)
      .flatMap(unit -> Stream.concat(unit.symbols().stream(), Stream.of(unit.unitName(), unit.toString()))
        .map(label -> Map.entry(normalize(label), unit))
        .distinct())
      .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
  }
Units of length and area measurement based off of constants defined in {@link USCustomary}.
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/Unit.java