@Override
  public long getFeatureCount() {
    long numFeatures = 0;
    for (String table : tableNames()) {
      try (
        var stmt = conn.createStatement();
        @SuppressWarnings("java:S2077") // table name checked against a regex
        var result = stmt.executeQuery("SELECT COUNT(*) FROM %S WHERE GEOMETRY IS NOT NULL;".formatted(table))
      ) {
        numFeatures += result.getLong(1);
      } catch (SQLException e) {
        // maybe no GEOMETRY column?
      }
    }
    return numFeatures;
  }
Returns a JDBC connection to the sqlite file. Input can be the sqlite file itself or a zip file containing it.
planetiler-core/src/main/java/com/onthegomap/planetiler/reader/NaturalEarthReader.java