Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java @ 5379:61bf64b102bc mapgenfix
Merge with default branch
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Fri, 22 Mar 2013 11:25:54 +0100 |
parents | 394841a66c14 |
children | d3f170484455 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java Wed Mar 06 14:14:15 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java Fri Mar 22 11:25:54 2013 +0100 @@ -175,14 +175,15 @@ logger.debug("MainValuesArtifact.initialize"); FLYSArtifact winfo = (FLYSArtifact) artifact; RangeAccess rangeAccess = new RangeAccess(winfo, null); - double [] locations = rangeAccess.getLocations(); + double [] locations = rangeAccess.getKmRange(); + if (locations != null) { double location = locations[0]; addData("ld_locations", new DefaultStateData("ld_locations", null, null, String.valueOf(location))); } else { - logger.warn("No location for mainvalues given."); + logger.error("No location for mainvalues given."); } importData(winfo, "river"); } @@ -247,7 +248,13 @@ // TODO use helper to get location as double String locationStr = getDataAsString("ld_locations"); - if (river == null || locationStr == null) { + if (river == null) { + logger.error("River is null"); + return null; + } + + if (locationStr == null) { + logger.error("Locationstr is null"); return null; }