Commit f39df346 authored by Poulet Camille's avatar Poulet Camille
Browse files

Error GR3D String reading

parent fe8449ef
......@@ -10,7 +10,7 @@
<riverBasinShpFile>data/input/northeastamerica/shape/riverbasins.shp</riverBasinShpFile>
<continentShpFile>data/input/northeastamerica/shape/nea_continent.shp</continentShpFile>
<riverBasinNameLabel>NAME</riverBasinNameLabel>
<seaBasinNameLabel>name</seaBasinNameLabel>
<seaBasinNameLabel>NAME</seaBasinNameLabel>
<continentPathName>PATH</continentPathName>
<distanceGridFileName>data/input/northeastamerica/distanceGridNEA.csv</distanceGridFileName>
<temperatureCatchmentFile>data/input/northeastamerica/basins_temperatures_from_1800.csv</temperatureCatchmentFile>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -396,16 +396,19 @@ public class BasinNetworkSWithContinent extends BasinNetwork {
char[] charac = { '"' };
String doublequote = new String(charac);
scanner.nextLine(); // skip the first line with headers
while (scanner.hasNext()) {
scanner.next(); // skip gid
name = scanner.next();
while (scanner.hasNextLine()) {
String[] fields = scanner.nextLine().split(",");
// skip gid
name = fields[1];
name = name.replaceAll(new String(doublequote), "");
year = (long) scanner.nextInt();
year = Long.valueOf (fields[2]);
Double[] seasonalTemperature = new Double[4];
seasonalTemperature[0] = scanner.nextDouble();
seasonalTemperature[1] = scanner.nextDouble();
seasonalTemperature[2] = scanner.nextDouble();
seasonalTemperature[3] = scanner.nextDouble();
seasonalTemperature[0] = Double.valueOf(fields[3]);
seasonalTemperature[1] = Double.valueOf(fields[4]);
seasonalTemperature[2] = Double.valueOf(fields[5]);
seasonalTemperature[3] = Double.valueOf(fields[6]);
// scanner.nextLine();
// store seasonal temperatures for each basin for the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment