|
@@ -104,7 +104,7 @@ func cacheChunk(chunkPos: Vector2):
|
|
|
# the origin of each .img file lies in it's upper left corner
|
|
|
# so we need to read the files from the end on the northern hemisphere
|
|
|
if lat >= 0:
|
|
|
- var origin = (chunkPos.x + 1.0)*tc.resolution*tc.samplesPerLine*4
|
|
|
+ var origin = tc.lines*tc.samplesPerLine*4
|
|
|
tc.file.seek((origin - line) + chunkPos.y*tc.resolution*4)
|
|
|
else:
|
|
|
tc.file.seek(line + chunkPos.y*tc.resolution*4)
|