diff gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContextFactory.java @ 474:ab29e4ff2fda

Added area interpolation needed for "Horizontalschnitt" gnv-artifacts/trunk@540 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 14 Jan 2010 10:34:05 +0000
parents d6a100d5f74a
children 1bf058f1a2d1
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContextFactory.java	Wed Jan 13 23:10:56 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContextFactory.java	Thu Jan 14 10:34:05 2010 +0000
@@ -72,6 +72,9 @@
     public final static String HORIZONTAL_CROSS_SECTION_PROFILE_SAMPLES =
         "/artifact-database/gnv/horizontal-cross-section-profile/samples/@number";
 
+    public final static String HORIZONTAL_CROSS_SECTION_GROUND_INTERPOLATION =
+        "/artifact-database/gnv/horizontal-cross-section/ground/@interpolation";
+
     public final static String HORIZONTAL_CROSS_SECTION_SAMPLES =
         "/artifact-database/gnv/horizontal-cross-section/samples/@number";
     
@@ -323,6 +326,33 @@
 
         configureHorizontalCrossSectionSamples(config, context);
         configureHorizontalCrossSectionResultShapeFilePath(config, context);
+        configureHorizontalCrossSectionGroundInterpolation(config, context);
+    }
+
+    protected void configureHorizontalCrossSectionGroundInterpolation(
+        Document           config,
+        GNVArtifactContext context
+    )
+    {
+        log.info(
+            "configuration of horizontal cross section ground interpolation");
+
+        String interpolation = Config.getStringXPath(
+            config,
+            HORIZONTAL_CROSS_SECTION_GROUND_INTERPOLATION);
+
+        if (interpolation == null 
+        || (interpolation = interpolation.trim()).length() == 0) {
+            interpolation = GNVArtifactContext
+                .DEFAULT_HORIZONTAL_CROSS_SECTION_GROUND_INTERPOLATION;
+        }
+
+        log.info("ground interpolation: " + interpolation);
+
+        context.put(
+            GNVArtifactContext
+                .HORIZONTAL_CROSS_SECTION_GROUND_INTERPOLATION_KEY,
+            interpolation);
     }
 
     protected void configureHorizontalCrossSectionResultShapeFilePath(

http://dive4elements.wald.intevation.org