Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java @ 1641:eb3ab28d1c21
The extent of the WSPLGEN facets are now determined by the extent of the start and end CrossSectionTrack of the WSPLGEN calculation.
flys-artifacts/trunk@2827 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 26 Sep 2011 15:35:46 +0000 |
parents | f45bbc80bd3d |
children | 74142aa5d938 |
comparison
equal
deleted
inserted
replaced
1640:fb296bdf815f | 1641:eb3ab28d1c21 |
---|---|
124 | 124 |
125 protected String getSrid() { | 125 protected String getSrid() { |
126 return FLYSUtils.getRiverSrid(artifact); | 126 return FLYSUtils.getRiverSrid(artifact); |
127 } | 127 } |
128 | 128 |
129 protected String getWSPLGENBounds() { | |
130 String river = getRiver(); | |
131 double kms[] = FLYSUtils.getKmRange(artifact); | |
132 | |
133 CrossSectionTrack a = | |
134 CrossSectionTrack.getCrossSectionTrack(river, kms[0]); | |
135 | |
136 CrossSectionTrack b = | |
137 CrossSectionTrack.getCrossSectionTrack(river, kms[1]); | |
138 | |
139 if (a == null || b == null) { | |
140 return null; | |
141 } | |
142 | |
143 return GeometryUtils.createOLBounds(a.getGeom(), b.getGeom()); | |
144 } | |
145 | |
129 protected String getBounds() { | 146 protected String getBounds() { |
130 return GeometryUtils.getRiverBounds(getRiver()); | 147 return GeometryUtils.getRiverBounds(getRiver()); |
131 } | 148 } |
132 | 149 |
133 public List<Facet> getFacets() { | 150 public List<Facet> getFacets() { |
145 ComputeType.ADVANCE, | 162 ComputeType.ADVANCE, |
146 stateId, | 163 stateId, |
147 hash, | 164 hash, |
148 getUrl()); | 165 getUrl()); |
149 | 166 |
167 String bounds = getWSPLGENBounds(); | |
168 | |
169 if (bounds == null || bounds.length() == 0) { | |
170 bounds = getBounds(); | |
171 } | |
172 | |
150 wsplgen.addLayer( | 173 wsplgen.addLayer( |
151 artifact.identifier() + MapfileGenerator.MS_WSPLGEN_POSTFIX); | 174 artifact.identifier() + MapfileGenerator.MS_WSPLGEN_POSTFIX); |
152 wsplgen.setSrid(getSrid()); | 175 wsplgen.setSrid(getSrid()); |
153 wsplgen.setExtent(getBounds()); | 176 wsplgen.setExtent(bounds); |
154 | 177 |
155 facets.add(wsplgen); | 178 facets.add(wsplgen); |
156 } | 179 } |
157 | 180 |
158 public void createBarrierFacet() { | 181 public void createBarrierFacet() { |