[Dive4elements-commits] [PATCH] Get location limits from fixation overview in fixation location selection
Wald Commits
scm-commit at wald.intevation.org
Wed May 22 13:03:14 CEST 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1369220590 -7200
# Node ID 5f52a80796259687e9a6dc0c37c04468db8da540
# Parent 939fea2b24a22c0eccc9e1be990bf2b7753ed93b
Get location limits from fixation overview in fixation location selection
Part of issue 1277
diff -r 939fea2b24a2 -r 5f52a8079625 artifacts/src/main/java/org/dive4elements/river/artifacts/model/FixingsOverview.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FixingsOverview.java Wed May 22 12:51:16 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FixingsOverview.java Wed May 22 13:03:10 2013 +0200
@@ -815,5 +815,9 @@
document.appendChild(fixingsElement);
}
+
+ public Range getExtent() {
+ return extent;
+ }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
diff -r 939fea2b24a2 -r 5f52a8079625 artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/LocationSelect.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/LocationSelect.java Wed May 22 12:51:16 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/LocationSelect.java Wed May 22 13:03:10 2013 +0200
@@ -16,6 +16,8 @@
import org.dive4elements.river.artifacts.D4EArtifact;
import org.dive4elements.river.artifacts.states.RangeState;
+import org.dive4elements.river.artifacts.model.FixingsOverviewFactory;
+import org.dive4elements.river.artifacts.model.FixingsOverview;
/**
@@ -47,7 +49,10 @@
@Override
protected double[] getMinMax(Artifact artifact) {
D4EArtifact flysArtifact = (D4EArtifact) artifact;
- return RiverUtils.getRiverMinMax(flysArtifact);
+ String riverName = flysArtifact.getDataAsString("river");
+ FixingsOverview overview = FixingsOverviewFactory.getOverview(riverName);
+
+ return new double[]{overview.getExtent().getStart(), overview.getExtent().getEnd()};
}
More information about the Dive4elements-commits
mailing list