extended srtm latitude range

This commit is contained in:
Arndt Brenschede 2019-11-03 23:56:46 +01:00
parent 37970e3270
commit 0c6b53d354

View file

@ -165,7 +165,7 @@ public class PosUnifier extends MapCreatorBase
private SrtmRaster srtmForNode( int ilon, int ilat ) throws Exception private SrtmRaster srtmForNode( int ilon, int ilat ) throws Exception
{ {
int srtmLonIdx = ( ilon + 5000000 ) / 5000000; int srtmLonIdx = ( ilon + 5000000 ) / 5000000;
int srtmLatIdx = ( 154999999 - ilat ) / 5000000; int srtmLatIdx = ( 654999999 - ilat ) / 5000000 - 100; // ugly negative rounding...
if ( srtmLonIdx == lastSrtmLonIdx && srtmLatIdx == lastSrtmLatIdx ) if ( srtmLonIdx == lastSrtmLonIdx && srtmLatIdx == lastSrtmLatIdx )
{ {