private static long parseQid(Object qid) {
    long result = 0;
    if (qid instanceof String qidString) {
      Matcher matcher = qidPattern.matcher(qidString);
      if (matcher.matches()) {
        String idString = matcher.group(1);
        result = Parse.parseLong(idString);
      }
    }
    return result;
  }
Returns a numeric ID from a wikidata ID starting with a "Q".
planetiler-core/src/main/java/com/onthegomap/planetiler/util/Wikidata.java