Skip to content

Commit

Permalink
Merge pull request #18 from AgPipeline/develop
Browse files Browse the repository at this point in the history
Merging develop into main branch - no review
  • Loading branch information
Chris-Schnaufer authored Nov 2, 2020
2 parents 79f978e + e2a9d32 commit 0b0b735
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion agpypeline/geoimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def clip_raster(raster_path: str, bounds: tuple, out_path: str = None, compress:
subprocess.call(cmd, shell=True, stdout=open(os.devnull, 'wb'))
out_px = np.array(gdal.Open(out_path).ReadAsArray())

if np.count_nonzero(out_px) > 0:
# If we have any pixels, we consider clipping a success
if out_px.shape[0] > 0 and out_px.shape[1] > 0:
if out_path == "temp.tif":
os.remove(out_path)
return out_px
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name="agpypeline",
version="0.0.43",
version="0.0.44",
author="Jacob van der Leeuw",
author_email="[email protected]",
description="Installable package for entrypoint and drone-specific environment code within a transformer",
Expand Down

0 comments on commit 0b0b735

Please sign in to comment.