diff options
| author | Andrei Aiordachioaie <a.aiordachioaie@jacobs-university.de> | 2010-02-26 21:20:59 +0100 |
|---|---|---|
| committer | Andrei Aiordachioaie <a.aiordachioaie@jacobs-university.de> | 2010-02-26 21:26:29 +0100 |
| commit | 68e013031b6c2d71ee1cbffc0e1aaee25de1f3c7 (patch) | |
| tree | c511c8df9a85e25e4065bfc875ccff0b827eac97 /src | |
| parent | 16d4371742f512938877f2f7ce89b89ad078052a (diff) | |
Fixed small bug.
When trying to use coordinates in the EPSG:4326 (WGS84) coordinate
system, with a coverage that is not georeferenced in WGS84, now
Petascope displays a meaningful error message.
Diffstat (limited to 'src')
| -rw-r--r-- | src/petascope/ConfigManager.java | 2 | ||||
| -rw-r--r-- | src/petascope/wcps/server/core/DimensionIntervalElement.java | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/petascope/ConfigManager.java b/src/petascope/ConfigManager.java index 5896234..0a4985c 100644 --- a/src/petascope/ConfigManager.java +++ b/src/petascope/ConfigManager.java @@ -51,7 +51,7 @@ public class ConfigManager { v3 adds WGS84 handling in WCPS requests. */ private final static String MINOR = "3"; /* Bug-fix count. We have a hack: every WCPS response is written to disk. */ - private final static String BUGFIX = "2-hack"; + private final static String BUGFIX = "3-hack"; /* Petascope 1.2.0 contains WCS 1.1.0, WCS 2.0, WCS-T 1.0.0 and WCPS 1.0.0 */ public final static String PETASCOPE_VERSION = MAJOR + "." + MINOR + "." + BUGFIX; diff --git a/src/petascope/wcps/server/core/DimensionIntervalElement.java b/src/petascope/wcps/server/core/DimensionIntervalElement.java index 8d79510..ffd4e7b 100644 --- a/src/petascope/wcps/server/core/DimensionIntervalElement.java +++ b/src/petascope/wcps/server/core/DimensionIntervalElement.java @@ -162,6 +162,11 @@ public class DimensionIntervalElement implements IRasNode, ICoverageInfo /* If input coordinates are geo-, convert them to pixel coordinates. */
private void convertToPixelCoordinates()
{
+ if (meta.getCrs() == null && crs.getName().equals(DomainElement.WGS84_CRS))
+ {
+ throw new RuntimeException("Coverage '" + meta.getCoverageName() +
+ "' is not georeferenced with 'EPSG:4326' coordinate system.");
+ }
if (counter == 2 && crs != null && domain1.isSingleValue() && domain2.isSingleValue())
{
if (crs.getName().equals(DomainElement.WGS84_CRS))
|
