Fix tile updates for upper-left and lower-right rotations
This commit is contained in:
@@ -211,11 +211,11 @@ class MCRFileReader(object):
|
|||||||
|
|
||||||
def get_north_rotations(self):
|
def get_north_rotations(self):
|
||||||
if self.north_direction == 'upper-left':
|
if self.north_direction == 'upper-left':
|
||||||
return 1
|
return 3
|
||||||
elif self.north_direction == 'upper-right':
|
elif self.north_direction == 'upper-right':
|
||||||
return 2
|
return 2
|
||||||
elif self.north_direction == 'lower-right':
|
elif self.north_direction == 'lower-right':
|
||||||
return 3
|
return 1
|
||||||
elif self.north_direction == 'lower-left':
|
elif self.north_direction == 'lower-left':
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -338,7 +338,7 @@ class MCRFileReader(object):
|
|||||||
|
|
||||||
# read chunk location table
|
# read chunk location table
|
||||||
locations_index = numpy.reshape(numpy.rot90(numpy.reshape(range(32*32),
|
locations_index = numpy.reshape(numpy.rot90(numpy.reshape(range(32*32),
|
||||||
(32, 32)), self.get_north_rotations()), -1)
|
(32, 32)), -self.get_north_rotations()), -1)
|
||||||
for i in locations_index:
|
for i in locations_index:
|
||||||
self._locations[i] = self._read_chunk_location()
|
self._locations[i] = self._read_chunk_location()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user