Skip to content

Commit

Permalink
adding ones and zeros methods to raster class
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Bierbower authored and Will Bierbower committed Apr 13, 2015
1 parent 60036b7 commit 2325d2a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fauxgeo/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ def _repr_png_(self):
def save_raster(self, uri):
shutil.copyfile(self.uri, uri)

def ones(self):
return self.zeros() + 1

def zeros(self):
return self * 0

def band_count(self):
self._open_dataset()
count = self.dataset.RasterCount
Expand Down

0 comments on commit 2325d2a

Please sign in to comment.