+ // Construct the terrain track according to these extents and the grid size
+ terrainTrack = terrainHelper.createGridTrack(_track);
+ // Get the altitudes from SRTM for all the points in the track
+ LookupSrtmFunction srtmLookup = (LookupSrtmFunction) FunctionLibrary.FUNCTION_LOOKUP_SRTM;
+ srtmLookup.begin(terrainTrack);
+ while (srtmLookup.isRunning())
+ {
+ try {
+ Thread.sleep(750); // just polling in a wait loop isn't ideal but simple
+ }
+ catch (InterruptedException e) {}