Skip to content

Commit

Permalink
minor edit to raster's copy function
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 2325d2a commit 2394773
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fauxgeo/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@ def change_datatype_and_nodata(self, datatype, nodata_val):
proj = self.get_projection()
return Raster.from_array(array, affine, proj, datatype, nodata_val)

def copy(self, uri):
def copy(self, uri=None):
if not uri:
uri = pygeo.geoprocessing.temporary_filename()
if not os.path.isabs(uri):
uri = os.path.join(os.getcwd(), uri)
shutil.copyfile(self.uri, uri)
Expand Down

0 comments on commit 2394773

Please sign in to comment.