private static long extractIdFromWikidataIRI(String iri) {
    Matcher matcher = wikidataIRIMatcher.matcher(iri);
    if (matcher.matches()) {
      String idText = matcher.group(1);
      return Long.parseLong(idText);
    } else {
      throw new IllegalStateException("Unexpected response IRI: " + iri);
    }
  }
Returns a numeric ID from a wikidata IRI like {@code https://www.wikidata.org/wiki/Q9141}.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/Wikidata.java