]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - src/tim/prune/function/srtm/SrtmTile.java
Use SRTM 1deg data from NASA servers
[GpsPrune.git] / src / tim / prune / function / srtm / SrtmTile.java
index 301bbaf2ccb7849f1378a6f910999c188965a12a..7bc1d386419732c8d7ab9b048bcf06407d06a36b 100644 (file)
@@ -67,7 +67,20 @@ public class SrtmTile
                        + (_longitude >= 0?"E":"W")
                        + (Math.abs(_longitude) < 100?"0":"")
                        + (Math.abs(_longitude) < 10?"0":"")
-                       + Math.abs(_longitude)
-                       + ".hgt.zip";
+                       + Math.abs(_longitude);
+       }
+
+       public SrtmSource findBestCachedSource()
+       {
+               SrtmSource[] sources = {new SrtmGl1Source(),
+                                       new Srtm3Source() };
+               for (int i = 0; i < sources.length; i++)
+               {
+                       if (sources[i].isCached(this))
+                       {
+                               return sources[i];
+                       }
+               }
+               return null;
        }
 }