Mercurial > dive4elements > river
changeset 8204:c657ddcf1fa6
Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
line wrap: on
line diff
--- a/artifacts/doc/conf/generators/longitudinal-diagram-defaults.xml Fri Sep 05 13:19:22 2014 +0200 +++ b/artifacts/doc/conf/generators/longitudinal-diagram-defaults.xml Fri Sep 05 14:53:58 2014 +0200 @@ -36,6 +36,8 @@ <processor class="org.dive4elements.river.exports.process.BedQualityDensityProcessor" axis="Density"/> <processor class="org.dive4elements.river.exports.process.SedimentLoadTAProcessor" axis="SedimentLoadTA"/> <processor class="org.dive4elements.river.exports.process.SedimentLoadM3AProcessor" axis="SedimentLoadM3A"/> + <processor class="org.dive4elements.river.exports.process.SedimentLoadLSTAProcessor" axis="SedimentLoadTA"/> + <processor class="org.dive4elements.river.exports.process.SedimentLoadLSM3AProcessor" axis="SedimentLoadM3A"/> <processor class="org.dive4elements.river.exports.process.FlowVelocityProcessor" axis="Velocity"/> <processor class="org.dive4elements.river.exports.process.ShearStressProcessor" axis="Tau"/> <processor class="org.dive4elements.river.exports.process.SedimentDensityProcessor" axis="Density"/>
--- a/artifacts/doc/conf/themes.xml Fri Sep 05 13:19:22 2014 +0200 +++ b/artifacts/doc/conf/themes.xml Fri Sep 05 14:53:58 2014 +0200 @@ -310,6 +310,30 @@ <mapping from="gauge_discharge_curve" to="GaugeDischargeCurve" /> <mapping from="extreme_wq_curve" to="ExtremeWQCurve" /> <mapping from="extreme_wq_curve_base" to="ExtremeWQBaseCurve" /> + + <!-- Mappings for sediment load --> + <mapping from="sedimentload.ls.ta.coarse" to="SedimentLoadLSTACoarse" /> + <mapping from="sedimentload.ls.ta.fine_middle" to="SedimentLoadLSTAFineMid" /> + <mapping from="sedimentload.ls.ta.sand" to="SedimentLoadLSTASand" /> + <mapping from="sedimentload.ls.ta.susp_sand" to="SedimentLoadLSTASuspSand" /> + <mapping from="sedimentload.ls.ta.susp_sand_bed" to="SedimentLoadLSTASuspSandBed" /> + <mapping from="sedimentload.ls.ta.suspended_sediment" to="SedimentLoadLSTASediment" /> + <mapping from="sedimentload.ls.ta.suspended_load" to="SedimentLoadLSTASusp" /> + <mapping from="sedimentload.ls.ta.total" to="SedimentLoadLSTATotal" /> + <mapping from="sedimentload.ls.ta.bed_load" to="SedimentLoadLSTABed" /> + <mapping from="sedimentload.ls.ta.bed_load_susp_sand" to="SedimentLoadLSTABedSusp" /> + + <mapping from="sedimentload.ls.m3a.coarse" to="SedimentLoadLSM3ACoarse" /> + <mapping from="sedimentload.ls.m3a.fine_middle" to="SedimentLoadLSM3AFineMid" /> + <mapping from="sedimentload.ls.m3a.sand" to="SedimentLoadLSM3ASand" /> + <mapping from="sedimentload.ls.m3a.susp_sand" to="SedimentLoadLSM3ASuspSand" /> + <mapping from="sedimentload.ls.m3a.susp_sand_bed" to="SedimentLoadLSM3ASuspSandBed" /> + <mapping from="sedimentload.ls.m3a.suspended_sediment" to="SedimentLoadLSM3ASediment" /> + <mapping from="sedimentload.ls.m3a.suspended_load" to="SedimentLoadLSM3ASusp" /> + <mapping from="sedimentload.ls.m3a.total" to="SedimentLoadLSM3ATotal" /> + <mapping from="sedimentload.ls.m3a.bed_load" to="SedimentLoadLSM3ABed" /> + <mapping from="sedimentload.ls.m3a.bed_load_susp_sand" to="SedimentLoadLSM3ABedSusp" /> + <mapping from="sedimentload.ta.coarse" to="SedimentLoadTACoarse" /> <mapping from="sedimentload.ta.fine_middle" to="SedimentLoadTAFineMid" /> <mapping from="sedimentload.ta.sand" to="SedimentLoadTASand" /> @@ -319,7 +343,8 @@ <mapping from="sedimentload.ta.suspended_load" to="SedimentLoadTASusp" /> <mapping from="sedimentload.ta.total" to="SedimentLoadTATotal" /> <mapping from="sedimentload.ta.bed_load" to="SedimentLoadTABed" /> - <mapping from="sedimentload.ta.unknown" to="SedimentLoadTAUnknown" /> + <mapping from="sedimentload.ta.bed_load_susp_sand" to="SedimentLoadTABedSusp" /> + <mapping from="sedimentload.m3a.coarse" to="SedimentLoadM3ACoarse" /> <mapping from="sedimentload.m3a.fine_middle" to="SedimentLoadM3AFineMid" /> <mapping from="sedimentload.m3a.sand" to="SedimentLoadM3ASand" /> @@ -329,16 +354,7 @@ <mapping from="sedimentload.m3a.suspended_load" to="SedimentLoadM3ASusp" /> <mapping from="sedimentload.m3a.total" to="SedimentLoadM3ATotal" /> <mapping from="sedimentload.m3a.bed_load" to="SedimentLoadM3ABed" /> - <mapping from="sedimentload.m3a.unknown" to="SedimentLoadM3AUnknown" /> - <mapping from="sedimentload.coarse" to="SedimentLoadCoarse" /> - <mapping from="sedimentload.fine_middle" to="SedimentLoadFineMid" /> - <mapping from="sedimentload.sand" to="SedimentLoadSand" /> - <mapping from="sedimentload.susp_sand" to="SedimentLoadSuspSand" /> - <mapping from="sedimentload.susp_sand_bed" to="SedimentLoadSuspSandBed" /> - <mapping from="sedimentload.suspended_sediment" to="SedimentLoadSediment" /> - <mapping from="sedimentload.suspended_load" to="SedimentLoadSusp" /> - <mapping from="sedimentload.total" to="SedimentLoadTotal" /> - <mapping from="sedimentload.bed_load" to="SedimentLoadBed" /> + <mapping from="sedimentload.m3a.bed_load_susp_sand" to="SedimentLoadM3ABedSusp" /> </mappings> </themes>
--- a/artifacts/doc/conf/themes/default.xml Fri Sep 05 13:19:22 2014 +0200 +++ b/artifacts/doc/conf/themes/default.xml Fri Sep 05 14:53:58 2014 +0200 @@ -1101,9 +1101,320 @@ </theme> <!-- Sediment load longitudinal sections, M^3/A --> + <theme name="SedimentLoadLSM3A"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linesize" type="int" default="2" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ACoarse"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3AFineMid"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ASand"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ASuspSand"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 255, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ASediment"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ASuspSandBed"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 0" /> + <field name="showlinelabel" type="boolean" + display="Beschriftung anzeigen" default="false" hints="hidden" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ATotal"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 100, 200" /> + <field name="showlinelabel" type="boolean" + display="Beschriftung anzeigen" default="false" hints="hidden" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ABed"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="200, 200, 200" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ABedSusp"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="150, 255, 150" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ASusp"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="85, 255, 0" /> + </fields> + </theme> + + <!-- Sediment load longitudinal sections, T/A --> + <theme name="SedimentLoadLSTACoarse"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTAFineMid"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTASand"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTASuspSand"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 255, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTASediment"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTASuspSandBed"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 0" /> + <field name="showlinelabel" type="boolean" + display="Beschriftung anzeigen" default="false" hints="hidden" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTATotal"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 100, 200" /> + <field name="showlinelabel" type="boolean" + display="Beschriftung anzeigen" default="false" hints="hidden" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTABed"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="200, 200, 200" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTABedSusp"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="150, 255, 150" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTASusp"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="85, 255, 0" /> + </fields> + </theme> + + <!-- Sediment load at measurement stations, T/A --> + <theme name="SedimentLoad"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linetype" type="Dash" default="10,5" /> + <field name="showpoints" type="boolean" default="true" /> + <field name="pointsize" type="int" default="3" /> + </fields> + </theme> + + <theme name="SedimentLoadTACoarse"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 255" /> + <field name="pointcolor" type="Color" default="255, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadTAFineMid"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 0" /> + <field name="pointcolor" type="Color" default="255, 0, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadTASand"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 0, 255" /> + <field name="pointcolor" type="Color" default="0, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadTASuspSand"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 255, 0" /> + <field name="pointcolor" type="Color" default="255, 255, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadTASediment"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 255" /> + <field name="pointcolor" type="Color" default="0, 255, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadTASuspSandBed"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 0" /> + <field name="pointcolor" type="Color" default="0, 255, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadTATotal"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 100, 200" /> + <field name="pointcolor" type="Color" default="0, 100, 200" /> + </fields> + </theme> + + <theme name="SedimentLoadTABed"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="200, 200, 200" /> + <field name="pointcolor" type="Color" default="200, 200, 200" /> + </fields> + </theme> + + <theme name="SedimentLoadTABedSusp"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="150, 255, 150" /> + <field name="pointcolor" type="Color" default="150, 255, 150" /> + </fields> + </theme> + + <theme name="SedimentLoadTASusp"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="85, 255, 0" /> + <field name="pointcolor" type="Color" default="85, 255, 0" /> + </fields> + </theme> + + <!-- Sediment load at measurement stations, M3/A --> <theme name="SedimentLoadM3A"> <inherits> - <inherit from="LongitudinalSection" /> + <inherit from="SedimentLoad" /> </inherits> <fields> <field name="linesize" type="int" default="2" /> @@ -1116,6 +1427,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="255, 0, 255" /> + <field name="pointcolor" type="Color" default="255, 0, 255" /> </fields> </theme> @@ -1125,6 +1437,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="255, 0, 0" /> + <field name="pointcolor" type="Color" default="255, 0, 0" /> </fields> </theme> @@ -1134,6 +1447,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="0, 0, 255" /> + <field name="pointcolor" type="Color" default="0, 0, 255" /> </fields> </theme> @@ -1143,6 +1457,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="255, 255, 0" /> + <field name="pointcolor" type="Color" default="255, 255, 0" /> </fields> </theme> @@ -1152,6 +1467,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="0, 255, 255" /> + <field name="pointcolor" type="Color" default="0, 255, 255" /> </fields> </theme> @@ -1161,19 +1477,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="0, 255, 0" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadM3ATotalLoad"> - <inherits> - <inherit from="SedimentLoadM3A" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 100, 100" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> + <field name="pointcolor" type="Color" default="0, 255, 0" /> </fields> </theme> @@ -1183,19 +1487,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="0, 100, 200" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadM3AUnknown"> - <inherits> - <inherit from="SedimentLoadM3A" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 0, 0" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> + <field name="pointcolor" type="Color" default="0, 100, 200" /> </fields> </theme> @@ -1205,6 +1497,17 @@ </inherits> <fields> <field name="linecolor" type="Color" default="200, 200, 200" /> + <field name="pointcolor" type="Color" default="200, 200, 200" /> + </fields> + </theme> + + <theme name="SedimentLoadM3ABedSusp"> + <inherits> + <inherit from="SedimentLoadM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="150, 255, 150" /> + <field name="pointcolor" type="Color" default="150, 255, 150" /> </fields> </theme> @@ -1214,215 +1517,6 @@ </inherits> <fields> <field name="linecolor" type="Color" default="85, 255, 0" /> - </fields> - </theme> - - <!-- Sediment load longitudinal sections, T/A --> - <theme name="SedimentLoadTACoarse"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 0, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadTAFineMid"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 0, 0" /> - </fields> - </theme> - - <theme name="SedimentLoadTASand"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 0, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadTASuspSand"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 255, 0" /> - </fields> - </theme> - - <theme name="SedimentLoadTASediment"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 255, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadTASuspSandBed"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 255, 0" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadTATotalLoad"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 100, 100" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadTATotal"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 100, 200" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadTAUnknown"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 0, 0" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadTABed"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="200, 200, 200" /> - </fields> - </theme> - - <theme name="SedimentLoadTASusp"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="85, 255, 0" /> - </fields> - </theme> - - <!-- Sediment load at measurement stations --> - <theme name="SedimentLoad"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linetype" type="Dash" default="10,5" /> - <field name="showpoints" type="boolean" default="true" /> - <field name="pointsize" type="int" default="3" /> - </fields> - </theme> - - <theme name="SedimentLoadCoarse"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 0, 255" /> - <field name="pointcolor" type="Color" default="255, 0, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadFineMid"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 0, 0" /> - <field name="pointcolor" type="Color" default="255, 0, 0" /> - </fields> - </theme> - - <theme name="SedimentLoadSand"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 0, 255" /> - <field name="pointcolor" type="Color" default="0, 0, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadSuspSand"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 255, 0" /> - <field name="pointcolor" type="Color" default="255, 255, 0" /> - </fields> - </theme> - - <theme name="SedimentLoadSediment"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 255, 255" /> - <field name="pointcolor" type="Color" default="0, 255, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadSuspSandBed"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 255, 0" /> - <field name="pointcolor" type="Color" default="0, 255, 0" /> - </fields> - </theme> - - <theme name="SedimentLoadTotal"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 100, 200" /> - <field name="pointcolor" type="Color" default="0, 100, 200" /> - </fields> - </theme> - - <theme name="SedimentLoadBed"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="200, 200, 200" /> - <field name="pointcolor" type="Color" default="200, 200, 200" /> - </fields> - </theme> - - <theme name="SedimentLoadSusp"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="85, 255, 0" /> <field name="pointcolor" type="Color" default="85, 255, 0" /> </fields> </theme>
--- a/artifacts/doc/conf/themes/second.xml Fri Sep 05 13:19:22 2014 +0200 +++ b/artifacts/doc/conf/themes/second.xml Fri Sep 05 14:53:58 2014 +0200 @@ -1101,9 +1101,320 @@ </theme> <!-- Sediment load longitudinal sections, M^3/A --> + <theme name="SedimentLoadLSM3A"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linesize" type="int" default="2" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ACoarse"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3AFineMid"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ASand"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ASuspSand"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 255, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ASediment"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ASuspSandBed"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 0" /> + <field name="showlinelabel" type="boolean" + display="Beschriftung anzeigen" default="false" hints="hidden" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ATotal"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 100, 200" /> + <field name="showlinelabel" type="boolean" + display="Beschriftung anzeigen" default="false" hints="hidden" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ABed"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="200, 200, 200" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ABedSusp"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="150, 255, 150" /> + </fields> + </theme> + + <theme name="SedimentLoadLSM3ASusp"> + <inherits> + <inherit from="SedimentLoadLSM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="85, 255, 0" /> + </fields> + </theme> + + <!-- Sediment load longitudinal sections, T/A --> + <theme name="SedimentLoadLSTACoarse"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTAFineMid"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTASand"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTASuspSand"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 255, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTASediment"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTASuspSandBed"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 0" /> + <field name="showlinelabel" type="boolean" + display="Beschriftung anzeigen" default="false" hints="hidden" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTATotal"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 100, 200" /> + <field name="showlinelabel" type="boolean" + display="Beschriftung anzeigen" default="false" hints="hidden" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTABed"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="200, 200, 200" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTABedSusp"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="150, 255, 150" /> + </fields> + </theme> + + <theme name="SedimentLoadLSTASusp"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="85, 255, 0" /> + </fields> + </theme> + + <!-- Sediment load at measurement stations, T/A --> + <theme name="SedimentLoad"> + <inherits> + <inherit from="LongitudinalSection" /> + </inherits> + <fields> + <field name="linetype" type="Dash" default="10,5" /> + <field name="showpoints" type="boolean" default="true" /> + <field name="pointsize" type="int" default="3" /> + </fields> + </theme> + + <theme name="SedimentLoadTACoarse"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 255" /> + <field name="pointcolor" type="Color" default="255, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadTAFineMid"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 0, 0" /> + <field name="pointcolor" type="Color" default="255, 0, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadTASand"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 0, 255" /> + <field name="pointcolor" type="Color" default="0, 0, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadTASuspSand"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="255, 255, 0" /> + <field name="pointcolor" type="Color" default="255, 255, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadTASediment"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 255" /> + <field name="pointcolor" type="Color" default="0, 255, 255" /> + </fields> + </theme> + + <theme name="SedimentLoadTASuspSandBed"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 255, 0" /> + <field name="pointcolor" type="Color" default="0, 255, 0" /> + </fields> + </theme> + + <theme name="SedimentLoadTATotal"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="0, 100, 200" /> + <field name="pointcolor" type="Color" default="0, 100, 200" /> + </fields> + </theme> + + <theme name="SedimentLoadTABed"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="200, 200, 200" /> + <field name="pointcolor" type="Color" default="200, 200, 200" /> + </fields> + </theme> + + <theme name="SedimentLoadTABedSusp"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="150, 255, 150" /> + <field name="pointcolor" type="Color" default="150, 255, 150" /> + </fields> + </theme> + + <theme name="SedimentLoadTASusp"> + <inherits> + <inherit from="SedimentLoad" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="85, 255, 0" /> + <field name="pointcolor" type="Color" default="85, 255, 0" /> + </fields> + </theme> + + <!-- Sediment load at measurement stations, M3/A --> <theme name="SedimentLoadM3A"> <inherits> - <inherit from="LongitudinalSection" /> + <inherit from="SedimentLoad" /> </inherits> <fields> <field name="linesize" type="int" default="2" /> @@ -1116,6 +1427,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="255, 0, 255" /> + <field name="pointcolor" type="Color" default="255, 0, 255" /> </fields> </theme> @@ -1125,6 +1437,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="255, 0, 0" /> + <field name="pointcolor" type="Color" default="255, 0, 0" /> </fields> </theme> @@ -1134,6 +1447,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="0, 0, 255" /> + <field name="pointcolor" type="Color" default="0, 0, 255" /> </fields> </theme> @@ -1143,6 +1457,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="255, 255, 0" /> + <field name="pointcolor" type="Color" default="255, 255, 0" /> </fields> </theme> @@ -1152,6 +1467,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="0, 255, 255" /> + <field name="pointcolor" type="Color" default="0, 255, 255" /> </fields> </theme> @@ -1161,19 +1477,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="0, 255, 0" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadM3ATotalLoad"> - <inherits> - <inherit from="SedimentLoadM3A" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 100, 100" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> + <field name="pointcolor" type="Color" default="0, 255, 0" /> </fields> </theme> @@ -1183,19 +1487,7 @@ </inherits> <fields> <field name="linecolor" type="Color" default="0, 100, 200" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadM3AUnknown"> - <inherits> - <inherit from="SedimentLoadM3A" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 0, 0" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> + <field name="pointcolor" type="Color" default="0, 100, 200" /> </fields> </theme> @@ -1205,6 +1497,17 @@ </inherits> <fields> <field name="linecolor" type="Color" default="200, 200, 200" /> + <field name="pointcolor" type="Color" default="200, 200, 200" /> + </fields> + </theme> + + <theme name="SedimentLoadM3ABedSusp"> + <inherits> + <inherit from="SedimentLoadM3A" /> + </inherits> + <fields> + <field name="linecolor" type="Color" default="150, 255, 150" /> + <field name="pointcolor" type="Color" default="150, 255, 150" /> </fields> </theme> @@ -1214,215 +1517,6 @@ </inherits> <fields> <field name="linecolor" type="Color" default="85, 255, 0" /> - </fields> - </theme> - - <!-- Sediment load longitudinal sections, T/A --> - <theme name="SedimentLoadTACoarse"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 0, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadTAFineMid"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 0, 0" /> - </fields> - </theme> - - <theme name="SedimentLoadTASand"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 0, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadTASuspSand"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 255, 0" /> - </fields> - </theme> - - <theme name="SedimentLoadTASediment"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 255, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadTASuspSandBed"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 255, 0" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadTATotalLoad"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 100, 100" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadTATotal"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 100, 200" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadTAUnknown"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 0, 0" /> - <field name="showlinelabel" type="boolean" - display="Beschriftung anzeigen" default="false" hints="hidden" /> - </fields> - </theme> - - <theme name="SedimentLoadTABed"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="200, 200, 200" /> - </fields> - </theme> - - <theme name="SedimentLoadTASusp"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="85, 255, 0" /> - </fields> - </theme> - - <!-- Sediment load at measurement stations --> - <theme name="SedimentLoad"> - <inherits> - <inherit from="LongitudinalSection" /> - </inherits> - <fields> - <field name="linetype" type="Dash" default="10,5" /> - <field name="showpoints" type="boolean" default="true" /> - <field name="pointsize" type="int" default="3" /> - </fields> - </theme> - - <theme name="SedimentLoadCoarse"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 0, 255" /> - <field name="pointcolor" type="Color" default="255, 0, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadFineMid"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 0, 0" /> - <field name="pointcolor" type="Color" default="255, 0, 0" /> - </fields> - </theme> - - <theme name="SedimentLoadSand"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 0, 255" /> - <field name="pointcolor" type="Color" default="0, 0, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadSuspSand"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="255, 255, 0" /> - <field name="pointcolor" type="Color" default="255, 255, 0" /> - </fields> - </theme> - - <theme name="SedimentLoadSediment"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 255, 255" /> - <field name="pointcolor" type="Color" default="0, 255, 255" /> - </fields> - </theme> - - <theme name="SedimentLoadSuspSandBed"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 255, 0" /> - <field name="pointcolor" type="Color" default="0, 255, 0" /> - </fields> - </theme> - - <theme name="SedimentLoadTotal"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="0, 100, 200" /> - <field name="pointcolor" type="Color" default="0, 100, 200" /> - </fields> - </theme> - - <theme name="SedimentLoadBed"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="200, 200, 200" /> - <field name="pointcolor" type="Color" default="200, 200, 200" /> - </fields> - </theme> - - <theme name="SedimentLoadSusp"> - <inherits> - <inherit from="SedimentLoad" /> - </inherits> - <fields> - <field name="linecolor" type="Color" default="85, 255, 0" /> <field name="pointcolor" type="Color" default="85, 255, 0" /> </fields> </theme>
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java Fri Sep 05 13:19:22 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java Fri Sep 05 14:53:58 2014 +0200 @@ -114,17 +114,6 @@ return fractions.get(index).getData(); - /* Are gaps neccessary now? - for (int x = 0; x < values[0].length-1; x++) { - // Introduce gaps where no data in measurement station. - if (Math.abs(values[0][x+1] - values[0][x]) > 3*EPSILON - && values[1][x+1] != values[1][x]) { - values[0][x] = Double.NaN; - values[1][x] = Double.NaN; - } - } - - return values; */ } /** Copy deeply. */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java Fri Sep 05 13:19:22 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java Fri Sep 05 14:53:58 2014 +0200 @@ -37,7 +37,7 @@ { private static Logger log = Logger.getLogger(SedimentLoadFacet.class); - private static final String NAME = "sedimentload"; + private static final String NAME = "sedimentload.ta"; public SedimentLoadFacet() { } @@ -88,7 +88,7 @@ String fraction = split.length >= 2 ? split[1] : ""; String years = split.length >= 3 ? split[2] : ""; - // Name has the pattern sedimentload.<grainfraction_name> + // Name has the pattern sedimentload.ta.<grainfraction_name> name = NAME + "." + fraction; log.debug("Created facet: " + name);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSFacet.java Fri Sep 05 13:19:22 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSFacet.java Fri Sep 05 14:53:58 2014 +0200 @@ -47,7 +47,7 @@ /* Aheinecke we probably need to get the kind and split this up here * in some way */ - private static final String NAME = "sedimentload"; + private static final String NAME = "sedimentload.ls"; public SedimentLoadLSFacet() { } @@ -111,9 +111,7 @@ log.debug("Kind: " + theLoad.getKind()); log.debug("Unit: " + theLoad.getUnit().getName()); - /* Name has the pattern sedimentload.<unit>.<grainfraction_name> - * this is partly done for backwards compatibility and theming. - * See issue 1681 for details. */ + // Name has the pattern sedimentload.ls.<unit>.<grainfraction_name> name = NAME; String i18nUnit = "";
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadLSM3AProcessor.java Fri Sep 05 14:53:58 2014 +0200 @@ -0,0 +1,32 @@ +/* Copyright (C) 2013 by Bundesanstalt für Gewässerkunde + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU AGPL (>=v3) + * and comes with ABSOLUTELY NO WARRANTY! Check out the + * documentation coming with Dive4Elements River for details. + */ +package org.dive4elements.river.exports.process; + +import org.apache.log4j.Logger; + +import org.dive4elements.river.exports.DiagramGenerator; + +public class SedimentLoadLSM3AProcessor extends SedimentLoadLSProcessor { + + private final static Logger logger = + Logger.getLogger(SedimentLoadM3AProcessor.class); + + public static final String I18N_YAXIS_LABEL = + "chart.sedimentload.ls.yaxis.label.m3pera"; + public static final String I18N_YAXIS_LABEL_DEFAULT = "[m\u00b3/a]"; + + @Override + public boolean canHandle(String facettype) { + return facettype.startsWith("sedimentload.ls.m3a"); + } + + @Override + public String getAxisLabel(DiagramGenerator generator) { + return generator.msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadLSProcessor.java Fri Sep 05 14:53:58 2014 +0200 @@ -0,0 +1,55 @@ +/* Copyright (C) 2013 by Bundesanstalt für Gewässerkunde + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU AGPL (>=v3) + * and comes with ABSOLUTELY NO WARRANTY! Check out the + * documentation coming with Dive4Elements River for details. + */ + +package org.dive4elements.river.exports.process; + +import org.apache.log4j.Logger; +import org.jfree.data.xy.XYSeries; + +import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; +import org.dive4elements.artifacts.CallContext; +import org.dive4elements.river.exports.DiagramGenerator; +import org.dive4elements.river.exports.StyledSeriesBuilder; +import org.dive4elements.river.jfree.StyledXYSeries; +import org.dive4elements.river.themes.ThemeDocument; + +// Base class for SedimantLoad$UNITProcessors +public class SedimentLoadLSProcessor extends DefaultProcessor +{ + private final static Logger log = + Logger.getLogger(SedimentLoadProcessor.class); + + @Override + public void doOut( + DiagramGenerator generator, + ArtifactAndFacet bundle, + ThemeDocument theme, + boolean visible) { + log.debug("doOut " + bundle.getFacetName()); + CallContext context = generator.getCallContext(); + XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), + false, // Handle NaN + theme); + Object data = bundle.getData(context); + String facetName = bundle.getFacetName(); + double [][] points; + + log.debug("Do out for: " + facetName); + if (facetName.startsWith("sedimentload.")) { + points = (double[][]) data; + } else { + log.error("Unknown facet name: " + facetName); + return; + } + + StyledSeriesBuilder.addPoints(series, points, false); // Keep NaN + + generator.addAxisSeries(series, axisName, visible); + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadLSTAProcessor.java Fri Sep 05 14:53:58 2014 +0200 @@ -0,0 +1,33 @@ +/* Copyright (C) 2013 by Bundesanstalt für Gewässerkunde + * Software engineering by Intevation GmbH + * + * This file is Free Software under the GNU AGPL (>=v3) + * and comes with ABSOLUTELY NO WARRANTY! Check out the + * documentation coming with Dive4Elements River for details. + */ + +package org.dive4elements.river.exports.process; + +import org.apache.log4j.Logger; + +import org.dive4elements.river.exports.DiagramGenerator; + +public class SedimentLoadLSTAProcessor extends SedimentLoadLSProcessor{ + + private final static Logger logger = + Logger.getLogger(SedimentLoadTAProcessor.class); + + public static final String I18N_YAXIS_LABEL = + "chart.sedimentload.ls.yaxis.label.tpera"; + public static final String I18N_YAXIS_LABEL_DEFAULT = "[t/a]"; + + @Override + public boolean canHandle(String facettype) { + return facettype.startsWith("sedimentload.ls.ta"); + } + + @Override + public String getAxisLabel(DiagramGenerator generator) { + return generator.msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); + } +}
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadProcessor.java Fri Sep 05 13:19:22 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadProcessor.java Fri Sep 05 14:53:58 2014 +0200 @@ -11,6 +11,8 @@ import org.apache.log4j.Logger; import org.jfree.data.xy.XYSeries; +import gnu.trove.TDoubleArrayList; + import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; import org.dive4elements.artifacts.CallContext; import org.dive4elements.river.exports.DiagramGenerator; @@ -18,12 +20,20 @@ import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.themes.ThemeDocument; +import org.dive4elements.river.artifacts.D4EArtifact; +import org.dive4elements.river.artifacts.access.RiverAccess; +import org.dive4elements.river.artifacts.model.minfo.SedimentLoadData; +import org.dive4elements.river.artifacts.model.minfo.SedimentLoadData.Station; +import org.dive4elements.river.artifacts.model.minfo.SedimentLoadDataFactory; + // Base class for SedimantLoad$UNITProcessors public class SedimentLoadProcessor extends DefaultProcessor { private final static Logger log = Logger.getLogger(SedimentLoadProcessor.class); + private static final double EPS = 1e-4; + @Override public void doOut( DiagramGenerator generator, @@ -37,19 +47,49 @@ theme); Object data = bundle.getData(context); String facetName = bundle.getFacetName(); - double [][] points; log.debug("Do out for: " + facetName); if (facetName.startsWith("sedimentload.")) { - points = (double[][]) data; + /* Remove stations (with NaN-values) at stations of + different type than appropriate for current fraction.*/ + String [] facetNameParts = facetName.split("\\."); + int gfSType = SedimentLoadData.measurementStationType( + SedimentLoadData.grainFractionIndex( + facetNameParts[facetNameParts.length-1])); + + RiverAccess access = + new RiverAccess((D4EArtifact)bundle.getArtifact()); + String river = access.getRiverName(); + SedimentLoadData sld = + SedimentLoadDataFactory.INSTANCE.getSedimentLoadData(river); + + double [][] allData = (double[][]) data; + TDoubleArrayList cleanedKms = + new TDoubleArrayList(allData[0].length); + TDoubleArrayList cleanedValues = + new TDoubleArrayList(allData[0].length); + + for (int i = 0; i < allData[0].length; ++i) { + double km = allData[0][i]; + Station station = sld.findStations(km-EPS, km+EPS).get(0); + if (station.isType(gfSType)) { + cleanedKms.add(km); + cleanedValues.add(allData[1][i]); + } + } + + double [][] points = new double[2][cleanedKms.size()]; + points[0] = cleanedKms.toNativeArray(); + points[1] = cleanedValues.toNativeArray(); + + StyledSeriesBuilder.addPoints(series, points, false); // Keep NaN + + generator.addAxisSeries(series, axisName, visible); + } else { log.error("Unknown facet name: " + facetName); return; } - - StyledSeriesBuilder.addPoints(series, points, false); // Keep NaN - - generator.addAxisSeries(series, axisName, visible); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadTAProcessor.java Fri Sep 05 13:19:22 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadTAProcessor.java Fri Sep 05 14:53:58 2014 +0200 @@ -23,8 +23,7 @@ @Override public boolean canHandle(String facettype) { - return facettype.startsWith("sedimentload") && - !facettype.startsWith("sedimentload.m3a"); + return facettype.startsWith("sedimentload.ta"); } @Override