|
@@ -2,10 +2,10 @@ extends Node
|
|
|
|
|
|
var Downloader = preload("res://downloader.gd")
|
|
|
|
|
|
-var datafile = "height/SLDEM2015_512_30N_60N_000_045_FLOAT.IMG"
|
|
|
+var datafile = "height/SLDEM2015_512_00N_30N_000_045_FLOAT.IMG"
|
|
|
var samplesPerLine = 23040
|
|
|
var lines = 15360
|
|
|
-var offset = 1737.4
|
|
|
+var offset = 1737.4#*1000
|
|
|
var scaleFact = 1
|
|
|
var resolution = 512
|
|
|
|
|
@@ -39,7 +39,7 @@ func cacheArea(latMinIN, latMaxIN, lonMinIN, lonMaxIN):
|
|
|
var lat = latMinIN
|
|
|
while lat <= latMaxIN:
|
|
|
cache[lat]={}
|
|
|
- file.seek(lat*resolution*samplesPerLine*4 + lonMinIN*resolution*4)
|
|
|
+ file.seek((latMax*resolution*samplesPerLine*4 - lat*resolution*samplesPerLine*4) + lonMinIN*resolution*4)
|
|
|
var lon = lonMinIN
|
|
|
while lon <= lonMaxIN:
|
|
|
cache[lat][lon] = file.get_float()
|