Mercurial > dive4elements > river
changeset 7945:2235bc9b66c0
merged.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 18 Jun 2014 14:29:05 +0200 |
parents | 9b092c960455 (current diff) 2fc967e24f03 (diff) |
children | 0f1a3bbfd243 |
files | |
diffstat | 7 files changed, 157 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java Wed Jun 18 14:27:56 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java Wed Jun 18 14:29:05 2014 +0200 @@ -62,6 +62,8 @@ /** The default separator for the CSV export. */ public static final char DEFAULT_CSV_SEPARATOR = ';'; + public static final String START_META_CHAR = "#"; + /** XPath that points to the desired export facet. */ public static final String XPATH_FACET = "/art:action/@art:type"; @@ -103,6 +105,25 @@ /** + * Write lines of informative content to CSV file. + * Usually this will be done above the column headers from within + * the implementation of writeCSVData in concret subclasses. + * + * @param writer The CSVWriter + * @param infolines Array of Strings with informative content. + * Each will be written to a separate line prefixed with START_META_CHAR. + */ + protected void writeCSVInfo(CSVWriter writer, String[] infolines) { + String[] metaline = new String[1]; + + for (String infoline: infolines) { + metaline[0] = START_META_CHAR + " " + infoline; + writer.writeNext(metaline); + } + + } + + /** * Concrete subclasses need to use this method to write their special data * objects into the PDF document. */ @@ -263,6 +284,9 @@ request, XPATH_FACET, ArtifactNamespaceContext.INSTANCE); } + protected String msg(String key) { + return Resources.getMsg(context.getMeta(), key, key); + } protected String msg(String key, String def) { return Resources.getMsg(context.getMeta(), key, def);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.java Wed Jun 18 14:27:56 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.java Wed Jun 18 14:29:05 2014 +0200 @@ -57,6 +57,47 @@ private static final Logger logger = Logger.getLogger(SQRelationExporter.class); + public static final String INFO_COEFF_A = + "export.sqrelation.csv.info.coeff.a"; + + public static final String INFO_COEFF_B = + "export.sqrelation.csv.info.coeff.b"; + + public static final String INFO_QMAX = + "export.sqrelation.csv.info.qmax"; + + public static final String INFO_R2 = + "export.sqrelation.csv.info.r2"; + + public static final String INFO_NTOT = + "export.sqrelation.csv.info.ntot"; + + public static final String INFO_NOUTL = + "export.sqrelation.csv.info.noutl"; + + public static final String INFO_CFERGUSON = + "export.sqrelation.csv.info.cferguson"; + + public static final String INFO_CDUAN = + "export.sqrelation.csv.info.cduan"; + + public static final String INFO_PARAM_A = + "export.sqrelation.csv.info.param.a"; + + public static final String INFO_PARAM_B = + "export.sqrelation.csv.info.param.b"; + + public static final String INFO_PARAM_C = + "export.sqrelation.csv.info.param.c"; + + public static final String INFO_PARAM_D = + "export.sqrelation.csv.info.param.d"; + + public static final String INFO_PARAM_E = + "export.sqrelation.csv.info.param.e"; + + public static final String INFO_PARAM_F = + "export.sqrelation.csv.info.param.f"; public static final String CSV_PARAMETER = "export.sqrelation.csv.header.parameter"; @@ -130,17 +171,17 @@ protected void writeCSVHeader(CSVWriter writer) { writer.writeNext(new String[] { - msg(CSV_KM , CSV_KM), - msg(CSV_PARAMETER, CSV_PARAMETER), - msg(CSV_COEFF_A , CSV_COEFF_A), - msg(CSV_COEFF_B , CSV_COEFF_B), - msg(CSV_SD, CSV_SD), - msg(CSV_QMAX, CSV_QMAX), - msg(CSV_COEFF_R, CSV_COEFF_R), - msg(CSV_N_TOTAL , CSV_N_TOTAL), - msg(CSV_N_OUTLIERS, CSV_N_OUTLIERS), - msg(CSV_C_DUAN, CSV_C_DUAN), - msg(CSV_C_FERGUSON, CSV_C_FERGUSON) + msg(CSV_KM), + msg(CSV_PARAMETER), + msg(CSV_COEFF_A), + msg(CSV_COEFF_B), + msg(CSV_SD), + msg(CSV_QMAX), + msg(CSV_COEFF_R), + msg(CSV_N_TOTAL), + msg(CSV_N_OUTLIERS), + msg(CSV_C_DUAN), + msg(CSV_C_FERGUSON) }); } @@ -148,6 +189,23 @@ protected void writeCSVData(CSVWriter writer) { logger.debug("writeCSVData"); + writeCSVInfo(writer, new String[] { + msg(INFO_COEFF_A), + msg(INFO_COEFF_B), + msg(INFO_QMAX), + msg(INFO_R2), + msg(INFO_NTOT), + msg(INFO_NOUTL), + msg(INFO_CFERGUSON), + msg(INFO_CDUAN), + msg(INFO_PARAM_A), + msg(INFO_PARAM_B), + msg(INFO_PARAM_C), + msg(INFO_PARAM_D), + msg(INFO_PARAM_E), + msg(INFO_PARAM_F) + }); + writeCSVHeader(writer); for (SQResult [] results: data) {
--- a/artifacts/src/main/resources/messages.properties Wed Jun 18 14:27:56 2014 +0200 +++ b/artifacts/src/main/resources/messages.properties Wed Jun 18 14:29:05 2014 +0200 @@ -424,6 +424,20 @@ export.sedimentload_ls.csv.header.suspsediment = susp. sediment export.sedimentload_ls.csv.header.suspsandbb = susp. sand (BB) export.sedimentload_ls.csv.header.total = total +export.sqrelation.csv.info.coeff.a = a: coefficient of transport curve +export.sqrelation.csv.info.coeff.b = b: exponent of transport curve +export.sqrelation.csv.info.qmax = Q max, measured: maximum measured discharge [m\u00b3/s] +export.sqrelation.csv.info.r2 = r^2: coefficient of determination +export.sqrelation.csv.info.ntot = n total: number of measurements +export.sqrelation.csv.info.noutl = n outliers: number of outliers +export.sqrelation.csv.info.cferguson = CFERGUSON: bias correction (Ferguson, 1986) +export.sqrelation.csv.info.cduan = CDUAN: bias correction (Duan, 1983) +export.sqrelation.csv.info.param.a = Parameter A: transport of fine material (< 0.063 mm) +export.sqrelation.csv.info.param.b = Parameter B: transport of suspended sand (0.063-2 mm) +export.sqrelation.csv.info.param.c = Parameter C: transport of sand (0.063-2 mm) +export.sqrelation.csv.info.param.d = Parameter D: transport of fine and medium gravel (2-16 mm) +export.sqrelation.csv.info.param.e = Parameter E: transport of coarse gravel (> Mittelkies)(16-125 mm) +export.sqrelation.csv.info.param.f = Parameter F: transport of bed load (0.063-125 mm) export.sqrelation.csv.header.parameter = Parameter export.sqrelation.csv.header.station = Station export.sqrelation.csv.header.km = River-Km
--- a/artifacts/src/main/resources/messages_de.properties Wed Jun 18 14:27:56 2014 +0200 +++ b/artifacts/src/main/resources/messages_de.properties Wed Jun 18 14:29:05 2014 +0200 @@ -426,6 +426,20 @@ export.sedimentload_ls.csv.header.suspsandbb = susp.Sand(BB) export.sedimentload_ls.csv.header.suspsediment = Schwebst. export.sedimentload_ls.csv.header.total = Gesamt +export.sqrelation.csv.info.coeff.a = a: Transportkurvenkoeffizient +export.sqrelation.csv.info.coeff.b = b: Transportkurvenexponent +export.sqrelation.csv.info.qmax = Q max, gemessen: maximal gemessener Abfluss [m\u00b3/s] +export.sqrelation.csv.info.r2 = r^2: Bestimmtheitsma\u00d +export.sqrelation.csv.info.ntot = n Gesamt: Anzahl Messwerte +export.sqrelation.csv.info.noutl = n Ausrei\u00dfer: Anzahl Ausrei\u00dfer +export.sqrelation.csv.info.cferguson = CFERGUSON: Bias Korrektur nach Ferguson 1986 +export.sqrelation.csv.info.cduan = CDUAN: Bias Korrektur nach Duan 1983 +export.sqrelation.csv.info.param.a = Parameter A: Sedimenttransport von Feinkornanteil (< 0.063 mm) +export.sqrelation.csv.info.param.b = Parameter B: Sedimenttransport von Sand (Suspensionstransort)(0.063-2 mm) +export.sqrelation.csv.info.param.c = Parameter C: Sedimenttransport von Sand (Geschiebetransport) (0.063-2 mm) +export.sqrelation.csv.info.param.d = Parameter D: Sedimenttransport von Fein- und Mittelkies (2-16 mm) +export.sqrelation.csv.info.param.e = Parameter E: Sedimenttransport von Grobkornanteil (> Mittelkies)(16-125 mm) +export.sqrelation.csv.info.param.f = Parameter F: Sedimenttransport von Geschiebtransportgesamt (0.063-125 mm) export.sqrelation.csv.header.parameter = Parameter export.sqrelation.csv.header.station = Station export.sqrelation.csv.header.km = Fluss-Km
--- a/artifacts/src/main/resources/messages_de_DE.properties Wed Jun 18 14:27:56 2014 +0200 +++ b/artifacts/src/main/resources/messages_de_DE.properties Wed Jun 18 14:29:05 2014 +0200 @@ -422,6 +422,20 @@ export.sedimentload_ls.csv.header.suspsandbb = susp.Sand(BB) export.sedimentload_ls.csv.header.suspsediment = Schwebst. export.sedimentload_ls.csv.header.total = Gesamt +export.sqrelation.csv.info.coeff.a = a: Transportkurvenkoeffizient +export.sqrelation.csv.info.coeff.b = b: Transportkurvenexponent +export.sqrelation.csv.info.qmax = Q max, gemessen: maximal gemessener Abfluss [m\u00b3/s] +export.sqrelation.csv.info.r2 = r^2: Bestimmtheitsma\u00d +export.sqrelation.csv.info.ntot = n Gesamt: Anzahl Messwerte +export.sqrelation.csv.info.noutl = n Ausrei\u00dfer: Anzahl Ausrei\u00dfer +export.sqrelation.csv.info.cferguson = CFERGUSON: Bias Korrektur nach Ferguson 1986 +export.sqrelation.csv.info.cduan = CDUAN: Bias Korrektur nach Duan 1983 +export.sqrelation.csv.info.param.a = Parameter A: Sedimenttransport von Feinkornanteil (< 0.063 mm) +export.sqrelation.csv.info.param.b = Parameter B: Sedimenttransport von Sand (Suspensionstransort)(0.063-2 mm) +export.sqrelation.csv.info.param.c = Parameter C: Sedimenttransport von Sand (Geschiebetransport) (0.063-2 mm) +export.sqrelation.csv.info.param.d = Parameter D: Sedimenttransport von Fein- und Mittelkies (2-16 mm) +export.sqrelation.csv.info.param.e = Parameter E: Sedimenttransport von Grobkornanteil (> Mittelkies)(16-125 mm) +export.sqrelation.csv.info.param.f = Parameter F: Sedimenttransport von Geschiebtransportgesamt (0.063-125 mm) export.sqrelation.csv.header.parameter = Parameter export.sqrelation.csv.header.station = Station export.sqrelation.csv.header.km = Fluss-Km
--- a/artifacts/src/main/resources/messages_en.properties Wed Jun 18 14:27:56 2014 +0200 +++ b/artifacts/src/main/resources/messages_en.properties Wed Jun 18 14:29:05 2014 +0200 @@ -428,6 +428,20 @@ export.sedimentload_ls.csv.header.suspsand = susp. sand export.sedimentload_ls.csv.header.suspsediment = susp. sediment export.sedimentload_ls.csv.header.total = total +export.sqrelation.csv.info.coeff.a = a: coefficient of transport curve +export.sqrelation.csv.info.coeff.b = b: exponent of transport curve +export.sqrelation.csv.info.qmax = Q max, measured: maximum measured discharge [m\u00b3/s] +export.sqrelation.csv.info.r2 = r^2: coefficient of determination +export.sqrelation.csv.info.ntot = n total: number of measurements +export.sqrelation.csv.info.noutl = n outliers: number of outliers +export.sqrelation.csv.info.cferguson = CFERGUSON: bias correction (Ferguson, 1986) +export.sqrelation.csv.info.cduan = CDUAN: bias correction (Duan, 1983) +export.sqrelation.csv.info.param.a = Parameter A: transport of fine material (< 0.063 mm) +export.sqrelation.csv.info.param.b = Parameter B: transport of suspended sand (0.063-2 mm) +export.sqrelation.csv.info.param.c = Parameter C: transport of sand (0.063-2 mm) +export.sqrelation.csv.info.param.d = Parameter D: transport of fine and medium gravel (2-16 mm) +export.sqrelation.csv.info.param.e = Parameter E: transport of coarse gravel (> Mittelkies)(16-125 mm) +export.sqrelation.csv.info.param.f = Parameter F: transport of bed load (0.063-125 mm) export.sqrelation.csv.header.parameter = Parameter export.sqrelation.csv.header.station = Station export.sqrelation.csv.header.km = River-Km
--- a/backend/doc/documentation/de/importer-hydr-morph.tex Wed Jun 18 14:27:56 2014 +0200 +++ b/backend/doc/documentation/de/importer-hydr-morph.tex Wed Jun 18 14:29:05 2014 +0200 @@ -883,7 +883,7 @@ \subsection{Starten des Fachdaten Importers} \label{start-hydr} Der Fachdaten Importer wird mit Hilfe eines Shellskripts von einer Konsole -gestartet. Dazu führen folgenden Befehl aus:\\ +gestartet. Dazu folgenden Befehl ausführen:\\ \begin{lstlisting} ./run_hydr_morph.sh pfad/zur/beispiel.gew @@ -897,6 +897,13 @@ Ebenfalls wichtig ist die Zeile beginnend mit \textit{Gewässer:} in der der Name des Gewässers festgelegt wird. +Zusätzlich kann die Datei eine Zeile beginnend mit \textit{uuid:} +enthalten. Dahinter kann eine +UUID\footnote{\url{http://de.wikipedia.org/wiki/UUID}} stehen, +die als eindeutiger Bezeichner des Datensatzes verwendet wird +(derzeit für die Zuordnung der Darstellung von Gewässern in der +interaktiven Einstiegskarte zu Datensätzen in der Datenbank). + Nachdem der Prompt der Konsole zurückkehrt, ist der Import abgeschlossen oder es ist ein Fehler aufgetreten. Weitere Informationen entnehmen Sie der Log-Datei.