Skip to content

Commit

Permalink
Issue #4. Polygon draw was broken for non-square bounding boxes as wi…
Browse files Browse the repository at this point in the history
…dth and height were interchanged.
  • Loading branch information
Paul Haesler committed May 31, 2018
1 parent 51852f6 commit bf0a23b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datacube_wms/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ def _write_empty(geobox):
def _write_polygon(geobox, polygon, zoom_fill):
geobox_ext = geobox.extent
if geobox_ext.within(polygon):
data = numpy.full([geobox.width, geobox.height], fill_value=1, dtype="uint8")
data = numpy.full([geobox.height, geobox.width], fill_value=1, dtype="uint8")
else:
data = numpy.zeros([geobox.width, geobox.height], dtype="uint8")
data = numpy.zeros([geobox.height, geobox.width], dtype="uint8")
if not geobox_ext.disjoint(polygon):
intersection = geobox_ext.intersection(polygon)
if intersection.type == 'Polygon':
Expand Down

0 comments on commit bf0a23b

Please sign in to comment.