[PATCH] Conf files for the infrastructure datacage extension
Wald Commits
scm-commit at wald.intevation.org
Mon Jun 4 12:50:56 CEST 2018
# HG changeset patch
# User mschaefer
# Date 1528109439 -7200
# Node ID edc3958b3ed2e5df339134d28764635fb31dc5e0
# Parent a165cd63099fbd0ebcf2450ef16f68d7f1c34625
Conf files for the infrastructure datacage extension
diff -r a165cd63099f -r edc3958b3ed2 artifacts/doc/conf/conf.xml
--- a/artifacts/doc/conf/conf.xml Mon Jun 04 11:55:08 2018 +0200
+++ b/artifacts/doc/conf/conf.xml Mon Jun 04 12:50:39 2018 +0200
@@ -199,6 +199,9 @@
<artifact-factory name="flowdepthxf" description="Factory to create an artifact used in sinfo datacage."
ttl="3600000"
artifact="org.dive4elements.river.artifacts.sinfo.predefinedflowdepth.PredefinedFlowDepthArtifact">org.dive4elements.artifactdatabase.DefaultArtifactFactory</artifact-factory>
+ <artifact-factory name="infrastructuref" description="Factory to create an artifact used in sinfo datacage."
+ ttl="3600000"
+ artifact="org.dive4elements.river.artifacts.sinfo.flood_duration.InfrastructureArtifact">org.dive4elements.artifactdatabase.DefaultArtifactFactory</artifact-factory>
</artifact-factories>
diff -r a165cd63099f -r edc3958b3ed2 artifacts/doc/conf/generators/longitudinal-diagram-defaults.xml
--- a/artifacts/doc/conf/generators/longitudinal-diagram-defaults.xml Mon Jun 04 11:55:08 2018 +0200
+++ b/artifacts/doc/conf/generators/longitudinal-diagram-defaults.xml Mon Jun 04 12:50:39 2018 +0200
@@ -62,6 +62,7 @@
<processor class="org.dive4elements.river.artifacts.sinfo.common.PredefinedDepthEvolProcessor" axis="flowdepthDevelopmentAxis"/>
<processor class="org.dive4elements.river.artifacts.sinfo.common.PredefinedDepthEvolPerYearProcessor" axis="flowdepthDevelopmentPerYearAxis"/>
<processor class="org.dive4elements.river.artifacts.sinfo.common.PredefinedFlowDepthProcessor" axis="flowdepthAxis"/>
+ <processor class="org.dive4elements.river.artifacts.sinfo.common.InfrastructureHeightProcessor" axis="W"/>
<chartextender class="org.dive4elements.river.artifacts.sinfo.flowdepth.FlowDepthChartExtender" />
</longitudinal-defaults>
\ No newline at end of file
diff -r a165cd63099f -r edc3958b3ed2 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Mon Jun 04 11:55:08 2018 +0200
+++ b/artifacts/doc/conf/meta-data.xml Mon Jun 04 12:50:39 2018 +0200
@@ -1618,6 +1618,10 @@
<dc:call-macro name="sinfo_predefined_channel"/>
</sinfo_predefined_channel>
+ <sinfo_infrastructure>
+ <dc:call-macro name="sinfo_infrastructure"/>
+ </sinfo_infrastructure>
+
<sinfo_predefined_tkh>
<dc:call-macro name="sinfo_predefined_tkh-berechnung"/>
<dc:call-macro name="sinfo_predefined_tkh-messung"/>
@@ -3421,7 +3425,7 @@
<dc:statement>
SELECT s.id AS id, MIN(s.filename) AS seriesname, MIN(v.station) AS km_min, MAX(v.station) AS km_max,
MIN(s.filename) || '<br />'
- || '[km ' || MIN(v.station) || ' - ' || MAX(v.station) || ']<br />'
+ || MIN(s.kmrange_info) || ']<br />'
|| MIN(s.year_from) || ' - ' || MIN(s.year_to) || '<br />' AS info
FROM channel s INNER JOIN channel_values v ON s.id=v.channel_id
WHERE (s.river_id=${river_id})
@@ -3458,7 +3462,7 @@
SELECT sc.tkh_id AS tkh_id, sc.id AS tkh_col_id, MIN(sc.name) AS tkh_col_name,
MIN(s.filename) AS tkh_name, MIN(v.station) AS km_min, MAX(v.station) AS km_max,
MIN(s.filename) || '<br />'
- || '[km ' || MIN(v.station) || ' - ' || MAX(v.station) || ']<br />'
+ || MIN(s.kmrange_info) || ']<br />'
|| MIN(s.sounding_info) || '<br />'
|| MIN(s.evaluation_by) AS info
FROM tkh_column sc INNER JOIN tkh s ON sc.tkh_id=s.id
@@ -3501,7 +3505,7 @@
<dc:statement>
SELECT s.id AS depthevol_id, MIN(s.filename) AS depthevol_name, MIN(v.station) AS km_min, MAX(v.station) AS km_max,
MIN(s.filename) || '<br />'
- || '[km ' || MIN(v.station) || ' - ' || MAX(v.station) || ']<br />'
+ || MIN(s.kmrange_info) || ']<br />'
|| MIN(s.start_year) || ' - ' || MIN(s.reference_year) || '<br />'
|| MIN(s.old_sounding) || ' - ' || MIN(s.curr_sounding) || '<br />'
|| MIN(s.old_glw) || ' - ' || MIN(s.curr_glw) AS info
@@ -3529,7 +3533,7 @@
SELECT sc.flow_depth_id AS flowdepth_id, sc.id AS flowdepth_col_id, MIN(sc.name) AS flowdepth_col_name,
MIN(s.filename) AS flowdepth_name, MIN(v.station) AS km_min, MAX(v.station) AS km_max,
MIN(s.filename) || '<br />'
- || '[km ' || MIN(v.station) || ' - ' || MAX(v.station) || ']<br />'
+ || MIN(s.kmrange_info) || ']<br />'
|| MIN(s.sounding_info) || '<br />'
|| MIN(s.evaluation_by) AS info
FROM flow_depth_column sc INNER JOIN flow_depth s ON sc.flow_depth_id=s.id
@@ -3551,5 +3555,29 @@
</dc:context>
</dc:macro>
+ <!-- infrastructure height imported from CSV-files for S-INFO -->
+ <dc:macro name="sinfo_infrastructure">
+ <dc:context>
+ <dc:statement>
+ SELECT s.id AS id, MIN(s.filename) AS seriesname, MIN(v.station) AS km_min, MAX(v.station) AS km_max,
+ MIN(x.name) AS typename,
+ MIN(s.filename) || '<br />'
+ || MIN(s.kmrange_info) || '<br />'
+ || MIN(s.year) || '<br />' AS info
+ FROM infrastructure s INNER JOIN infrastructure_values v ON s.id=v.infrastructure_id
+ INNER JOIN annotation_types x ON s.annotation_type_id=x.id
+ WHERE (s.river_id=${river_id})
+ AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
+ GROUP BY s.id
+ ORDER BY MIN(s.filename) DESC;
+ </dc:statement>
+ <dc:if test="dc:has-result()">
+ <dc:for-each>
+ <infrastructureseries name="{$seriesname}" ids="infrastructurex-{$id}-{$seriesname}" factory="infrastructuref" target_out="{$out}" info="{$info}"/>
+ </dc:for-each>
+ </dc:if>
+ </dc:context>
+ </dc:macro>
+
</datacage>
</dc:template>
\ No newline at end of file
diff -r a165cd63099f -r edc3958b3ed2 artifacts/doc/conf/themes.xml
--- a/artifacts/doc/conf/themes.xml Mon Jun 04 11:55:08 2018 +0200
+++ b/artifacts/doc/conf/themes.xml Mon Jun 04 12:50:39 2018 +0200
@@ -447,5 +447,6 @@
<mapping from="sinfo_facet_predefined_depthevol" to="SInfoPredefinedDepthEvol" />
<mapping from="sinfo_facet_predefined_depthevol_per_year" to="SInfoPredefinedDepthEvolPerYear" />
<mapping from="sinfo_facet_predefined_flowdepth" to="SInfoPredefinedFlowDepth" />
+ <mapping from="sinfo_facet_infrastructure_height" to="SInfoInfrastructureHeight" />
</mappings>
</themes>
\ No newline at end of file
diff -r a165cd63099f -r edc3958b3ed2 artifacts/doc/conf/themes/default.xml
--- a/artifacts/doc/conf/themes/default.xml Mon Jun 04 11:55:08 2018 +0200
+++ b/artifacts/doc/conf/themes/default.xml Mon Jun 04 12:50:39 2018 +0200
@@ -3044,4 +3044,14 @@
<field name="linecolor" type="Color" display="Linienfarbe" default="96, 128, 192" />
</fields>
</theme>
+ <theme name="SInfoInfrastructureHeight">
+ <inherits>
+ <inherit from="LongitudinalSectionPoints" />
+ <inherit from="Label" />
+ </inherits>
+ <fields>
+ <field name="pointsize" type="int" display="Punktdicke" default="3" />
+ <field name="pointcolor" type="Color" display="Punktfarbe" default="0, 192, 0" />
+ </fields>
+ </theme>
</themegroup>
\ No newline at end of file
diff -r a165cd63099f -r edc3958b3ed2 artifacts/doc/conf/themes/second.xml
--- a/artifacts/doc/conf/themes/second.xml Mon Jun 04 11:55:08 2018 +0200
+++ b/artifacts/doc/conf/themes/second.xml Mon Jun 04 12:50:39 2018 +0200
@@ -3032,4 +3032,13 @@
<field name="linecolor" type="Color" display="Linienfarbe" default="96, 128, 192" />
</fields>
</theme>
+ <theme name="SInfoInfrastructureHeight">
+ <inherits>
+ <inherit from="LongitudinalSectionPoints" />
+ </inherits>
+ <fields>
+ <field name="pointsize" type="int" display="Punktdicke" default="3" hints="hidden" />
+ <field name="pointcolor" type="Color" display="Punktfarbe" default="0, 128, 0" />
+ </fields>
+ </theme>
</themegroup>
\ No newline at end of file
More information about the Dive4Elements-commits
mailing list