comparison flys-artifacts/src/main/java/de/intevation/flys/utils/FLYSUtils.java @ 2765:79f6d0802b06

Prepare improved Discharge curve compatibility. flys-artifacts/trunk@4504 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 24 May 2012 13:39:59 +0000
parents 3f1cc396d253
children d20215a0afd8
comparison
equal deleted inserted replaced
2764:f8a1a8af338e 2765:79f6d0802b06
315 */ 315 */
316 public static double[] getLocations(FLYSArtifact flys) { 316 public static double[] getLocations(FLYSArtifact flys) {
317 String locationStr = flys.getDataAsString("ld_locations"); 317 String locationStr = flys.getDataAsString("ld_locations");
318 318
319 if (locationStr == null || locationStr.length() == 0) { 319 if (locationStr == null || locationStr.length() == 0) {
320 if (flys instanceof WINFOArtifact) {
321 WINFOArtifact winfo = (WINFOArtifact) flys;
322 if (winfo.getReferenceStartKm() != null) {
323 return new double[]
324 {
325 winfo.getReferenceStartKm().doubleValue(),
326 winfo.getReferenceEndKms()[0]
327 };
328 }
329 }
320 return null; 330 return null;
321 } 331 }
322 332
323 String[] tmp = locationStr.split(" "); 333 String[] tmp = locationStr.split(" ");
324 TDoubleArrayList locations = new TDoubleArrayList(); 334 TDoubleArrayList locations = new TDoubleArrayList();

http://dive4elements.wald.intevation.org