Skip to content

Commit

Permalink
[Optimization] optimize thumb generation algo
Browse files Browse the repository at this point in the history
  • Loading branch information
geosolutions committed Jun 25, 2019
1 parent fb98cf0 commit fccb376
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions geonode/geoserver/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1999,12 +1999,8 @@ def decimal_encode(bbox):
bounds[3] = 85.0
if bounds[1] < -85.051:
bounds[1] = -85.0
if bounds[0] > 180.0:
bounds[0] = 179.0
if bounds[3] < -180.0:
bounds[3] = -179.0
if 'zoom' in request_body:
zoom = request_body['zoom']
zoom = int(request_body['zoom'])
else:
zoom = bounds_to_zoom_level(bounds, width, height)

Expand Down Expand Up @@ -2041,7 +2037,6 @@ def decimal_encode(bbox):
transform: translate3d(0px, 0px, 0px) scale3d(1, 1, 1);'> \
\n".format(height=height, width=width, top=top, left=left)

numberOfRows = _n_step + 1 if numberOfRows > _n_step else numberOfRows
for row in range(0, numberOfRows):
for col in range(0, len(first_row)):
box = [col * 256, row * 256]
Expand Down

0 comments on commit fccb376

Please sign in to comment.