From 1e1f7d348d70a5ae7d2bfdffbb66020205852334 Mon Sep 17 00:00:00 2001 From: Andrei Aiordachioaie Date: Sat, 27 Feb 2010 15:17:20 +0100 Subject: Fixed minor bug. Bug was: If no CRS was specified in a trim operation, Petascope would fail with a "RuntimeException" and no additional explanation. --- .../wcps/server/core/DimensionIntervalElement.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/petascope/wcps/server/core/DimensionIntervalElement.java b/src/petascope/wcps/server/core/DimensionIntervalElement.java index 44bba22..b236b96 100644 --- a/src/petascope/wcps/server/core/DimensionIntervalElement.java +++ b/src/petascope/wcps/server/core/DimensionIntervalElement.java @@ -57,6 +57,14 @@ public class DimensionIntervalElement implements IRasNode, ICoverageInfo throws WCPSException, InvalidCrsException { + if (covInfo.getCoverageName() != null) + { + // Add WGS84 CRS information from coverage metadata, may be useful + // for converting geo-coordinates to pixel-coordinates + String coverageName = covInfo.getCoverageName(); + meta = xq.getMetadataSource().read(coverageName); + } + System.err.println("Trying to parse DimensionIntervalElement expression..."); String name; @@ -95,14 +103,6 @@ public class DimensionIntervalElement implements IRasNode, ICoverageInfo node = node.getNextSibling(); if (axis == null) throw new WCPSException("Expected Axis node before CRS !"); - - if (covInfo.getCoverageName() != null) - { - // Add WGS84 CRS information from coverage metadata, may be useful - // for converting geo-coordinates to pixel-coordinates - String coverageName = covInfo.getCoverageName(); - meta = xq.getMetadataSource().read(coverageName); - } continue; } catch (WCPSException e) -- cgit