From 7deb441dad8256977debe57a29342402756afe85 Mon Sep 17 00:00:00 2001
From: Luc Maisonobe <luc@orekit.org>
Date: Tue, 1 Apr 2014 15:43:43 +0200
Subject: [PATCH] Improved message for missing Aster file.

---
 .../main/java/org/orekit/rugged/geotiff/AsterMessages.java    | 2 +-
 .../main/java/org/orekit/rugged/geotiff/AsterTileUpdater.java | 3 ++-
 .../resources/assets/org/orekit/rugged/AsterMessages_en.utf8  | 4 ++--
 .../resources/assets/org/orekit/rugged/AsterMessages_fr.utf8  | 4 ++--
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/geotiff/src/main/java/org/orekit/rugged/geotiff/AsterMessages.java b/geotiff/src/main/java/org/orekit/rugged/geotiff/AsterMessages.java
index f7f547ad..aac358bd 100644
--- a/geotiff/src/main/java/org/orekit/rugged/geotiff/AsterMessages.java
+++ b/geotiff/src/main/java/org/orekit/rugged/geotiff/AsterMessages.java
@@ -50,7 +50,7 @@ public enum AsterMessages implements Localizable {
 
     // CHECKSTYLE: stop JavadocVariable check
 
-    NO_DEM_DATA_FOR_POINT("no Digital Elevation Model data for point {0}, {1}"),
+    NO_DEM_DATA_FOR_POINT("no Digital Elevation Model data for point {0}, {1} (should be in file {2})"),
     ERROR_PARSING_FILE("error parsing file {0}: {1}"),
     MISSING_PIXEL_SCALE("missing pixel scale GeoTIFF tag in file {0}"),
     MISSING_TIE_POINT("missing tie point GeoTIFF tag in file {0}"),
diff --git a/geotiff/src/main/java/org/orekit/rugged/geotiff/AsterTileUpdater.java b/geotiff/src/main/java/org/orekit/rugged/geotiff/AsterTileUpdater.java
index 9be8ec6e..44602a04 100644
--- a/geotiff/src/main/java/org/orekit/rugged/geotiff/AsterTileUpdater.java
+++ b/geotiff/src/main/java/org/orekit/rugged/geotiff/AsterTileUpdater.java
@@ -68,7 +68,8 @@ public class AsterTileUpdater implements TileUpdater {
             final File file = new File(directory, name);
             if (!file.exists()) {
                 throw new RuggedException(AsterMessages.NO_DEM_DATA_FOR_POINT,
-                                          FastMath.toDegrees(latitude), FastMath.toDegrees(longitude));
+                                          FastMath.toDegrees(latitude), FastMath.toDegrees(longitude),
+                                          name);
             }
 
             final ZipFile zipFile = new ZipFile(file);
diff --git a/geotiff/src/main/resources/assets/org/orekit/rugged/AsterMessages_en.utf8 b/geotiff/src/main/resources/assets/org/orekit/rugged/AsterMessages_en.utf8
index 94d1e8bd..e19c356a 100644
--- a/geotiff/src/main/resources/assets/org/orekit/rugged/AsterMessages_en.utf8
+++ b/geotiff/src/main/resources/assets/org/orekit/rugged/AsterMessages_en.utf8
@@ -1,5 +1,5 @@
-# no Digital Elevation Model data for point {0}, {1}
-NO_DEM_DATA_FOR_POINT = no Digital Elevation Model data for point {0}, {1}
+# no Digital Elevation Model data for point {0}, {1} (should be in file {2})
+NO_DEM_DATA_FOR_POINT = no Digital Elevation Model data for point {0}, {1} (should be in file {2})
 
 # error parsing file {0}: {1}
 ERROR_PARSING_FILE = error parsing file {0}: {1}
diff --git a/geotiff/src/main/resources/assets/org/orekit/rugged/AsterMessages_fr.utf8 b/geotiff/src/main/resources/assets/org/orekit/rugged/AsterMessages_fr.utf8
index c5b4ec13..7b7fea5a 100644
--- a/geotiff/src/main/resources/assets/org/orekit/rugged/AsterMessages_fr.utf8
+++ b/geotiff/src/main/resources/assets/org/orekit/rugged/AsterMessages_fr.utf8
@@ -1,5 +1,5 @@
-# no Digital Elevation Model data for point {0}, {1}
-NO_DEM_DATA_FOR_POINT = pas de données de Modèle Numérique de Terrain pour le point {0}, {1}
+# no Digital Elevation Model data for point {0}, {1} (should be in file {2})
+NO_DEM_DATA_FOR_POINT = pas de données de Modèle Numérique de Terrain pour le point {0}, {1} (elles devraient être dans le fichier {2})
 
 # error parsing file {0}: {1}
 ERROR_PARSING_FILE = erreur lors de l''analyse du fichier {0} : {1}
-- 
GitLab