Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java @ 5867:59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 28 Apr 2013 15:23:01 +0200 |
parents | 9a6741ccf6d4 |
children | af13ceeba52a |
comparison
equal
deleted
inserted
replaced
5866:9a6741ccf6d4 | 5867:59ff03ff48f1 |
---|---|
11 import org.dive4elements.artifactdatabase.state.Facet; | 11 import org.dive4elements.artifactdatabase.state.Facet; |
12 | 12 |
13 import org.dive4elements.artifacts.Artifact; | 13 import org.dive4elements.artifacts.Artifact; |
14 import org.dive4elements.artifacts.CallContext; | 14 import org.dive4elements.artifacts.CallContext; |
15 | 15 |
16 import org.dive4elements.river.artifacts.FLYSArtifact; | 16 import org.dive4elements.river.artifacts.D4EArtifact; |
17 | 17 |
18 import org.dive4elements.river.artifacts.access.RiverAccess; | 18 import org.dive4elements.river.artifacts.access.RiverAccess; |
19 import org.dive4elements.river.artifacts.context.RiverContext; | 19 import org.dive4elements.river.artifacts.context.RiverContext; |
20 | 20 |
21 import org.dive4elements.river.artifacts.math.MovingAverage; | 21 import org.dive4elements.river.artifacts.math.MovingAverage; |
50 public Object getData(Artifact artifact, CallContext context) { | 50 public Object getData(Artifact artifact, CallContext context) { |
51 logger.debug("Get data for flow velocity at index: " + index); | 51 logger.debug("Get data for flow velocity at index: " + index); |
52 | 52 |
53 Double start = (Double)context.getContextValue("startkm"); | 53 Double start = (Double)context.getContextValue("startkm"); |
54 Double end = (Double)context.getContextValue("endkm"); | 54 Double end = (Double)context.getContextValue("endkm"); |
55 FLYSArtifact flys = (FLYSArtifact) artifact; | 55 D4EArtifact flys = (D4EArtifact) artifact; |
56 | 56 |
57 CalculationResult res = (CalculationResult) | 57 CalculationResult res = (CalculationResult) |
58 flys.compute(context, hash, stateId, type, false); | 58 flys.compute(context, hash, stateId, type, false); |
59 | 59 |
60 FlowVelocityData[] data = (FlowVelocityData[]) res.getData(); | 60 FlowVelocityData[] data = (FlowVelocityData[]) res.getData(); |
61 if(start != null && end != null) { | 61 if(start != null && end != null) { |
62 RiverContext fc = (RiverContext)context.globalContext(); | 62 RiverContext fc = (RiverContext)context.globalContext(); |
63 ZoomScale scales = (ZoomScale)fc.get("zoomscale"); | 63 ZoomScale scales = (ZoomScale)fc.get("zoomscale"); |
64 RiverAccess access = new RiverAccess((FLYSArtifact)artifact); | 64 RiverAccess access = new RiverAccess((D4EArtifact)artifact); |
65 String river = access.getRiver(); | 65 String river = access.getRiver(); |
66 | 66 |
67 double radius = scales.getRadius(river, start, end); | 67 double radius = scales.getRadius(river, start, end); |
68 FlowVelocityData oldData = data[index]; | 68 FlowVelocityData oldData = data[index]; |
69 FlowVelocityData newData = new FlowVelocityData(); | 69 FlowVelocityData newData = new FlowVelocityData(); |