Skip to content

Commit

Permalink
adding set_datatype_and_nodata function 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 20, 2015
1 parent 3fcd090 commit 68456c3
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 @@ -565,6 +565,12 @@ def set_nodata(self, nodata_val):
datatype = self.get_datatype(1)
return Raster.from_array(array, affine, proj, datatype, nodata_val)

def set_datatype_and_nodata(self, datatype, nodata_val):
array = self.get_band(1)
affine = self.get_affine()
proj = self.get_projection()
return Raster.from_array(array, affine, proj, datatype, nodata_val)

def copy(self, uri=None):
if not uri:
uri = pygeo.geoprocessing.temporary_filename()
Expand Down

0 comments on commit 68456c3

Please sign in to comment.