[Dive4elements-commits] [PATCH 16 of 19] FacetCreator: Updated to use RangeAccess instead of FLYSUtils

Wald Commits scm-commit at wald.intevation.org
Thu Jan 24 14:14:28 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1358942694 -3600
# Node ID ba4d7f1538900c896d3db83c825d22e6aa0fdf3d
# Parent  e31231d0a7209766f9943469faf38e474bf6c66b
FacetCreator: Updated to use RangeAccess instead of FLYSUtils.

diff -r e31231d0a720 -r ba4d7f153890 flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java	Wed Jan 23 13:04:16 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java	Wed Jan 23 13:04:54 2013 +0100
@@ -9,6 +9,7 @@
 
 import de.intevation.artifactdatabase.state.Facet;
 import de.intevation.artifacts.CallContext;
+import de.intevation.flys.artifacts.access.RangeAccess;
 import de.intevation.flys.artifacts.FLYSArtifact;
 import de.intevation.flys.artifacts.model.FacetTypes;
 import de.intevation.flys.artifacts.model.map.WMSLayerFacet;
@@ -60,6 +61,7 @@
         this.stateId    = sId;
     }
 
+    // TODO We have FLYSUtils and will have RiverAccess to do this
     protected String getRiver() {
         return artifact.getDataAsString("river");
     }
@@ -74,7 +76,8 @@
 
     protected Envelope getWSPLGENBounds() {
         String river = getRiver();
-        double kms[] = FLYSUtils.getKmRange(artifact);
+        RangeAccess rangeAccess = new RangeAccess(artifact, null);
+        double kms[] = rangeAccess.getKmRange();
 
         logger.debug("### getWSPLGENBounds");
         logger.debug("###    from km: " + kms[0]);
@@ -111,7 +114,8 @@
 
     public void createWSPLGENFacet() {
         String river = getRiver();
-        double kms[] = FLYSUtils.getKmRange(artifact);
+        RangeAccess rangeAccess = new RangeAccess(artifact, null);
+        double kms[] = rangeAccess.getKmRange();
 
         WSPLGENLayerFacet wsplgen = new WSPLGENLayerFacet(
             0,


More information about the Dive4elements-commits mailing list