Skip to content

Commit

Permalink
Fix bug in geographic CRS requests. Issue #225
Browse files Browse the repository at this point in the history
  • Loading branch information
phaesler committed Mar 24, 2020
1 parent 47b8be6 commit 1711c6a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions datacube_ows/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,19 +321,18 @@ def get_map(args):
if not data or (params.style.masks and not pq_data):
body = _write_empty(params.geobox)
else:
body = _write_png(data, pq_data, params.style, extent_mask)
body = _write_png(data, pq_data, params.style, extent_mask, params.geobox)


cfg = get_config()
return body, 200, cfg.response_headers({"Content-Type": "image/png"})


@log_call
@opencensus_trace_call(tracer=tracer)
def _write_png(data, pq_data, style, extent_mask):
def _write_png(data, pq_data, style, extent_mask, geobox):
img_data = style.transform_data(data, pq_data, extent_mask)
width = len(img_data.coords["x"])
height = len(img_data.coords["y"])
width = geobox.width
height = geobox.height
# width, height = img_data.pixel_counts()


Expand Down

0 comments on commit 1711c6a

Please sign in to comment.