Mercurial > dive4elements > river
changeset 2037:986820795c3b
Better initialize cross_section.km of cross-section-artifacts.
flys-artifacts/trunk@3510 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 21 Dec 2011 11:56:08 +0000 |
parents | c03aeb0cf46b |
children | f73036b991e2 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Dec 21 11:29:59 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Dec 21 11:56:08 2011 +0000 @@ -1,3 +1,8 @@ +2011-12-21 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java: + Cover 'locations' case for initial km of cross section artifacts. + 2011-12-21 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java Wed Dec 21 11:29:59 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java Wed Dec 21 11:56:08 2011 +0000 @@ -24,6 +24,8 @@ import de.intevation.artifactdatabase.state.Facet; import de.intevation.artifactdatabase.state.State; +import de.intevation.flys.utils.FLYSUtils; + /** * Artifact describing a cross-section. @@ -115,7 +117,12 @@ CallMeta callMeta) { WINFOArtifact winfo = (WINFOArtifact) artifact; - this.addStringData(DATA_KM, winfo.getDataAsString("ld_from")); + double[] range = FLYSUtils.getKmRange(winfo); + double min = 0.0f; + if (range != null && range.length > 0) { + min = range[0]; + } + this.addStringData(DATA_KM, Double.toString(min)); }