diff --git a/data/weather_stations.csv b/data/weather_stations.csv index b5cbdcda84..852324548c 100644 --- a/data/weather_stations.csv +++ b/data/weather_stations.csv @@ -1,3 +1,4 @@ +# Source: https://simplemaps.com/data/world-cities Tokyo;35.6897 Jakarta;-6.1750 Delhi;28.6100 diff --git a/src/main/java/dev/morling/onebrc/CreateMeasurements3.java b/src/main/java/dev/morling/onebrc/CreateMeasurements3.java index 65589da8f0..a22793d4ef 100644 --- a/src/main/java/dev/morling/onebrc/CreateMeasurements3.java +++ b/src/main/java/dev/morling/onebrc/CreateMeasurements3.java @@ -71,6 +71,7 @@ private static ArrayList generateWeatherStations() throws Except var bigName = new StringBuilder(1 << 20); // Source: https://simplemaps.com/data/world-cities try (var rows = new BufferedReader(new FileReader("data/weather_stations.csv"));) { + rows.readLine(); // Skip the attribution line while (true) { var row = rows.readLine(); if (row == null) { @@ -84,6 +85,7 @@ private static ArrayList generateWeatherStations() throws Except var minLen = Integer.MAX_VALUE; var maxLen = Integer.MIN_VALUE; try (var rows = new BufferedReader(new FileReader("data/weather_stations.csv"))) { + rows.readLine(); // Skip the attribution line final var nameSource = new StringReader(bigName.toString()); final var buf = new char[MAX_NAME_LEN]; final var rnd = ThreadLocalRandom.current();