Skip to content

Commit

Permalink
add aliases for to_geotiff, read_geotiff
Browse files Browse the repository at this point in the history
these become the standard names in v0.8
  • Loading branch information
njwilson23 committed Sep 16, 2016
1 parent d3003e6 commit 3482573
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions karta/raster/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,10 +1036,13 @@ def to_aai(self, f, reference='corner', nodata_value=-9999):
f.close()
return

def gtiffwrite(self, fnm):
def to_geotiff(self, *args, **kwargs):
return self.to_gtiff(*args, **kwargs)

def gtiffwrite(self, *args, **kwargs):
warnings.warn("method `gtiffwrite` has been renamed `to_gtiff`",
FutureWarning)
return self.to_gtiff(fnm)
return self.to_gtiff(*args, **kwargs)

def aaiwrite(self, *args, **kwargs):
warnings.warn("method `aaiwrite` has been renamed `to_aai`",
Expand Down
1 change: 1 addition & 0 deletions karta/raster/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,6 @@ class of band used by returned grid (default karta.band.CompressedBand)

# Aliases for backwards compat.
gtiffread = read_gtiff
read_geotiff = read_gtiff
aairead = read_aai

0 comments on commit 3482573

Please sign in to comment.