comparison client/src/store/fairwayavailability.js @ 3457:870812d8f247

client: spuc05: implemented new data format (csv) for diagrams on map
author Markus Kottlaender <markus@intevation.de>
date Fri, 24 May 2019 15:32:47 +0200
parents 41349a9c8ce9
children b43cf476d791
comparison
equal deleted inserted replaced
3456:ca395be62023 3457:870812d8f247
358 }); 358 });
359 }); 359 });
360 // transformAFDLNWL 360 // transformAFDLNWL
361 commit("setFwLNWLData", data); 361 commit("setFwLNWLData", data);
362 }); 362 });
363 },
364 loadAvailableFairwayDepthLNWLForMap: ({ dispatch }, options) => {
365 return dispatch("loadAvailableFairwayDepthLNWL", options).then(
366 response => {
367 let data = response.split("\n").filter(d => d);
368 data.shift(); // remove header line
369 data = data.map(d => {
370 let columns = d.split(",");
371 return {
372 ldc: columns[2],
373 below: columns[3],
374 between: columns[4],
375 above: columns[5]
376 };
377 });
378 return data[0];
379 }
380 );
363 } 381 }
364 } 382 }
365 }; 383 };
366 384
367 export { LIMITINGFACTORS, FREQUENCIES, fairwayavailability }; 385 export { LIMITINGFACTORS, FREQUENCIES, fairwayavailability };