[Dive4elements-commits] [PATCH 2 of 2] Merged
Wald Commits
scm-commit at wald.intevation.org
Tue Jun 18 17:30:36 CEST 2013
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1371569428 -7200
# Node ID 791c7492b4ee9ae038b7549d19d3a0aee7f832e5
# Parent a8b065038c0cc7c90c660fc46caf64fd06e6dd27
# Parent d3ba73a88533ad99c9b43b693f6f226f99c66364
Merged
diff -r a8b065038c0c -r 791c7492b4ee .hgtags
--- a/.hgtags Tue Jun 18 17:28:27 2013 +0200
+++ b/.hgtags Tue Jun 18 17:30:28 2013 +0200
@@ -52,3 +52,4 @@
1a169e10c0f3e1f33990a91dd294512ac97d1a70 3.0.5
b689d2b9d1675739778083b2bcba336abb33f70c 3.0.6
5733d7f27196c5a8cf18231fbf187738f8fea560 3.0.7
+eec895f6ec801a7faaed96e9f01721e1143e7bb8 3.0.8
diff -r a8b065038c0c -r 791c7492b4ee artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Tue Jun 18 17:28:27 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml Tue Jun 18 17:30:28 2013 +0200
@@ -105,6 +105,9 @@
<dc:call-macro name="bed-heights-epoch"/>
</bedheights>
</dc:when>
+ <dc:when test="$out = 'sedimentload_ls'">
+ <dc:call-macro name="annotations"/>
+ </dc:when>
</dc:choose>
</dc:iterate>
</dc:when>
diff -r a8b065038c0c -r 791c7492b4ee artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterDataFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterDataFacet.java Tue Jun 18 17:28:27 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterDataFacet.java Tue Jun 18 17:30:28 2013 +0200
@@ -35,7 +35,7 @@
D4EArtifact d4e = (D4EArtifact) artifact;
BedQualityAccess access = new BedQualityAccess(d4e, context);
int ndx = getIndex() & 7;
- int diam = (getIndex() >> 3);
+ int diam = (getIndex() >> 4);
String diameter = "";
switch (diam) {
case 1: diameter = "d10"; break;
diff -r a8b065038c0c -r 791c7492b4ee artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java Tue Jun 18 17:28:27 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java Tue Jun 18 17:30:28 2013 +0200
@@ -55,7 +55,8 @@
" sp.tiefevon IS NOT NULL AND " +
" sp.tiefebis IS NOT NULL AND " + // TODO: Test if char diameter ist null.
" st.km BETWEEN :from - 0.001 AND :to + 0.001 AND " +
- " st.datum BETWEEN :start AND :end";
+ " st.datum BETWEEN :start AND :end " +
+ "ORDER BY st.km";
private static final String SQL_BEDLOAD_MEASUREMENT =
"SELECT m.km as km," +
@@ -82,7 +83,8 @@
" m.km IS NOT NULL AND " +
" m.d10 IS NOT NULL AND" + //TODO: Add all other char. diameter.
" m.km BETWEEN :from - 0.001 AND :to + 0.001 AND" +
- " m.datum BETWEEN :start AND :end";
+ " m.datum BETWEEN :start AND :end " +
+ "ORDER BY m.km";
public static final class QualityMeasurementResultTransformer
extends BasicTransformerAdapter {
diff -r a8b065038c0c -r 791c7492b4ee artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java Tue Jun 18 17:28:27 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java Tue Jun 18 17:30:28 2013 +0200
@@ -14,6 +14,8 @@
import org.apache.log4j.Logger;
import org.dive4elements.artifactdatabase.state.Facet;
+import org.dive4elements.artifactdatabase.state.FacetActivity;
+import org.dive4elements.artifacts.Artifact;
import org.dive4elements.artifacts.CallContext;
import org.dive4elements.artifacts.CallMeta;
import org.dive4elements.river.artifacts.D4EArtifact;
@@ -48,6 +50,33 @@
public static final String I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD = "facet.sedimentload.total_load";
public static final String I18N_FACET_SEDIMENTLOAD_TOTAL = "facet.sedimentload.total";
+ static {
+ // Active/deactivate facets.
+ FacetActivity.Registry.getInstance().register(
+ "minfo",
+ new FacetActivity() {
+ @Override
+ public Boolean isInitialActive(
+ Artifact artifact,
+ Facet facet,
+ String output
+ ) {
+ String name = facet.getName();
+ if (name.equals(SEDIMENT_LOAD_COARSE) ||
+ name.equals(SEDIMENT_LOAD_FINEMIDDLE) ||
+ name.equals(SEDIMENT_LOAD_SAND) ||
+ name.equals(SEDIMENT_LOAD_SUSP_SAND) ||
+ name.equals(SEDIMENT_LOAD_SUSP_SEDIMENT) ||
+ name.equals(SEDIMENT_LOAD_SUSP_SAND_BED)){
+ return Boolean.FALSE;
+ }
+ else {
+ return null;
+ }
+ }
+ });
+ }
+
@Override
public Object computeAdvance(D4EArtifact artifact, String hash,
CallContext context, List<Facet> facets, Object old) {
diff -r a8b065038c0c -r 791c7492b4ee artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java Tue Jun 18 17:28:27 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java Tue Jun 18 17:30:28 2013 +0200
@@ -122,6 +122,9 @@
row[ndx] = beds[k].getDiameterCap(km);
row[ndx + 1] = beds[k].getDiameterSub(km);
}
+ if (beds.length == 0) {
+ continue;
+ }
BedParametersResult[] params = results[j].getParameters();
for(int k = 0; k < params.length; k++) {
// loads.length + (beds.lenght * 2) * (j + 1): shift bed and bedload columns.
@@ -203,6 +206,9 @@
beds[j].getType().toString()) + " - " +
d1 + "-" + d2);
}
+ if (beds.length == 0) {
+ continue;
+ }
if (params.length > 0) {
header.add(
msg(CSV_HEADER_DENSITY_CAP, CSV_HEADER_DENSITY_CAP) +
diff -r a8b065038c0c -r 791c7492b4ee artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java Tue Jun 18 17:28:27 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java Tue Jun 18 17:30:28 2013 +0200
@@ -70,7 +70,7 @@
public static final String I18N_YAXIS_D_LABEL_DEFAULT = "delta S [m]";
public static final String I18N_YAXIS_V_LABEL_DEFAULT = "Geschwindigkeit v [m/s]";
- private D4EArtifact artifact;
+ private String yLabel = "";
@Override
protected YAxisWalker getYAxisWalker() {
@@ -101,8 +101,16 @@
}
Facet facet = bundle.getFacet();
- artifact = (D4EArtifact)bundle.getArtifact();
+ D4EArtifact artifact = (D4EArtifact)bundle.getArtifact();
+ SedimentLoadAccess slaccess = new SedimentLoadAccess(artifact);
+ String unit = slaccess.getUnit();
+ if (unit != null && unit.equals("m3_per_a")) {
+ yLabel = msg(I18N_YAXIS_LABEL_2, I18N_YAXIS_LABEL_DEFAULT_2);
+ }
+ else {
+ yLabel = msg(I18N_YAXIS_LABEL_1, I18N_YAXIS_LABEL_DEFAULT_1);
+ }
if (facet == null) {
return;
}
@@ -118,13 +126,11 @@
context.putContextValue("endkm", getXBounds(0).getUpper());
}
else if (getXBounds(0) == null && getDomainAxisRange() == null) {
- D4EArtifact artifact = (D4EArtifact)bundle.getArtifact();
RangeAccess access = new RangeAccess(artifact);
context.putContextValue("startkm", access.getFrom());
context.putContextValue("endkm", access.getTo());
}
else if (getXBounds(0) == null && getDomainAxisRange() != null){
- D4EArtifact artifact = (D4EArtifact)bundle.getArtifact();
RangeAccess access = new RangeAccess(artifact);
Bounds b = new DoubleBounds(access.getFrom(), access.getTo());
Bounds bounds =
@@ -226,13 +232,7 @@
protected String getDefaultYAxisLabel(int pos) {
String label = "default";
if (pos == YAXIS.L.idx) {
- SedimentLoadAccess access = new SedimentLoadAccess(artifact);
- if (access.getUnit().equals("m3_per_a")) {
- label = msg(I18N_YAXIS_LABEL_2, I18N_YAXIS_LABEL_DEFAULT_2);
- }
- else {
- label = msg(I18N_YAXIS_LABEL_1, I18N_YAXIS_LABEL_DEFAULT_1);
- }
+ label = yLabel;
}
else if (pos == YAXIS.V.idx) {
label = msg(I18N_YAXIS_V_LABEL, I18N_YAXIS_V_LABEL_DEFAULT);
diff -r a8b065038c0c -r 791c7492b4ee gwt-client/src/main/webapp/images/FLYS_Karte_interactive.html
--- a/gwt-client/src/main/webapp/images/FLYS_Karte_interactive.html Tue Jun 18 17:28:27 2013 +0200
+++ b/gwt-client/src/main/webapp/images/FLYS_Karte_interactive.html Tue Jun 18 17:30:28 2013 +0200
@@ -76,8 +76,8 @@
<area id="neckar_wehrarm_area" shape="poly" onmouseover="highlight('Neckar (über Wehrarme)'); highlightList('Neckar (über Wehrarme)')" onmouseout="unHighlight('Neckar (über Wehrarme)'); unHighlightList('Neckar (über Wehrarme)')" onclick="selectRiver('Neckar (über Wehrarme)')" coords="272,524,248,540,253,561,259,570,254,605,306,615,308,590,290,583,292,546,320,540,309,529" />
<area id="oder_area" shape="poly" onmouseover="highlight('Oder'); highlightList('Oder')" onmouseout="unHighlight('Oder'); unHighlightList('Oder')" onclick="selectRiver('Oder')" coords="572,143,542,155,542,178,529,203,541,238,565,252,583,273,570,307,603,327,641,320,639,286,633,275,614,269,619,246,635,236,637,195,606,160" />
<area id="rhein_area" shape="poly" onmouseover="highlight('Rhein'); highlightList('Rhein')" onmouseout="unHighlight('Rhein'); unHighlightList('Rhein')" onclick="selectRiver('Rhein')" coords="86,301,138,317,157,334,153,355,177,381,185,407,198,450,197,464,219,471,224,478,240,473,241,492,269,502,273,523,249,539,254,561,260,570,256,597,227,628,229,639,252,653,277,644,279,668,236,670,237,690,265,687,281,696,283,717,248,728,188,737,170,718,167,669,203,569,222,545,213,521,195,521,193,467,171,459,145,444,122,403,49,391,52,352,23,344,4,304" />
- <area id="saale_area" shape="poly" onmouseover="highlight('Saale'); highlightList('Saale')" onmouseout="unHighlight('Saale'); unHighlightList('Saale')" onclick="selectRiver('Saale')" coords="445,314,414,311,366,299,366,342,395,346,404,356,424,358,477,354,463,341" />
- <area id="saale_thueringen_area" shape="poly" onmouseover="highlight('Saale-Thüringen'); highlightList('Saale-Thüringen')" onmouseout="unHighlight('Saale-Thüringen'); unHighlightList('Saale-Thüringen')" onclick="selectRiver('Saale-Thüringen')" coords="424,358,476,354,490,384,430,461,375,444,387,415,402,408,420,387,435,383" />
+ <area id="saale_area" shape="poly" onmouseover="highlight('Saale'); highlightList('Saale')" onmouseout="unHighlight('Saale'); unHighlightList('Saale')" onclick="selectRiver('Saale')" coords="445,314,414,311,366,299,366,342,395,346,404,356,477,371,463,341" />
+ <area id="saale_thueringen_area" shape="poly" onmouseover="highlight('Saale-Thüringen'); highlightList('Saale-Thüringen')" onmouseout="unHighlight('Saale-Thüringen'); unHighlightList('Saale-Thüringen')" onclick="selectRiver('Saale-Thüringen')" coords="430,365,462,377,477,385,430,461,375,444,387,415,402,408,420,387,435,383" />
<area id="saar_area" shape="poly" onmouseover="highlight('Saar'); highlightList('Saar')" onmouseout="unHighlight('Saar'); unHighlightList('Saar')" onclick="selectRiver('Saar')" coords="150,539,129,544,139,564,155,588,181,593,187,565,201,536,195,526,195,512,154,516" />
<area id="saar_wiltingerbogen_area" shape="poly" onmouseover="highlight('Saar (Wiltinger Bogen)'); highlightList('Saar (Wiltinger Bogen)')" onmouseout="unHighlight('Saar (Wiltinger Bogen)'); unHighlightList('Saar (Wiltinger Bogen)')" onclick="selectRiver('Saar (Wiltinger Bogen)')" coords="139,518,155,516,149,540,130,542" />
<area id="werra_sommer_area" shape="poly" onmouseover="highlight('Werra (Sommer)'); highlightList('Werra (Sommer)')" onmouseout="unHighlight('Werra (Sommer)'); unHighlightList('Werra (Sommer)')" onclick="selectRiver('Werra (Sommer)')" coords="316,361,334,351,360,342,387,345,398,354,384,372,381,389,371,400,350,390,345,382,336,378,334,372,329,368" />
diff -r a8b065038c0c -r 791c7492b4ee gwt-client/src/main/webapp/images/FLYS_Saale.png
Binary file gwt-client/src/main/webapp/images/FLYS_Saale.png has changed
diff -r a8b065038c0c -r 791c7492b4ee gwt-client/src/main/webapp/images/FLYS_Saale_1_inactive.png
Binary file gwt-client/src/main/webapp/images/FLYS_Saale_1_inactive.png has changed
diff -r a8b065038c0c -r 791c7492b4ee gwt-client/src/main/webapp/images/FLYS_Saale_Thueringen.png
Binary file gwt-client/src/main/webapp/images/FLYS_Saale_Thueringen.png has changed
diff -r a8b065038c0c -r 791c7492b4ee gwt-client/src/main/webapp/images/FLYS_Saale_Thueringen_inactive.png
Binary file gwt-client/src/main/webapp/images/FLYS_Saale_Thueringen_inactive.png has changed
diff -r a8b065038c0c -r 791c7492b4ee gwt-client/src/main/webapp/images/FLYS_Saale_inactive.png
Binary file gwt-client/src/main/webapp/images/FLYS_Saale_inactive.png has changed
More information about the Dive4elements-commits
mailing list