From 5db0cb209f90e427beb9f541bcbf1e5b6e65316c Mon Sep 17 00:00:00 2001
From: jlaura <jlaura@asu.edu>
Date: Tue, 19 Jul 2016 20:53:32 -0700
Subject: [PATCH] Prints removed and fixes raster to raster matching to conform
 to GeoDataset API.

---
 plio/io/io_gdal.py | 16 ++++++++--------
 plio/utils/log.py  |  2 --
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/plio/io/io_gdal.py b/plio/io/io_gdal.py
index 719e18f..f1349c4 100644
--- a/plio/io/io_gdal.py
+++ b/plio/io/io_gdal.py
@@ -533,11 +533,11 @@ def match_rasters(match_to, match_from, destination,
 
     Parameters
     ==========
-    match : object
-            A GeoDataSet object to be matched to
+    match_to : object
+               A GeoDataSet object to be matched to
 
-    source : object
-             A GeoDataSet object to be clipped
+    match_from : object
+                 A GeoDataSet object to be clipped
 
     destination : str
                   PATH where the output will be written
@@ -549,15 +549,15 @@ def match_rasters(match_to, match_from, destination,
                         GRA_Mode}
     """
     # TODO: If a destination is not provided create an in-memory GeoDataSet object
-    match_to_srs = match_to.ds.GetProjection()
+    match_to_srs = match_to.dataset.GetProjection()
     match_to_gt = match_to.geotransform
-    width, height = match_to.rastersize
+    width, height = match_to.raster_size
 
-    match_from__srs = match_from.ds.GetProjection()
+    match_from__srs = match_from.dataset.GetProjection()
     match_from__gt = match_from.geotransform
 
     dst = gdal.GetDriverByName('GTiff').Create(destination, width, height, 1, gdalconst.GDT_Float32)
     dst.SetGeoTransform(match_to_gt)
     dst.SetProjection(match_to_srs)
 
-    gdal.ReprojectImage(match_from.ds, dst, None, None, getattr(gdalconst, resampling_method))
+    gdal.ReprojectImage(match_from.dataset, dst, None, None, getattr(gdalconst, resampling_method))
diff --git a/plio/utils/log.py b/plio/utils/log.py
index 74721b8..b578eae 100644
--- a/plio/utils/log.py
+++ b/plio/utils/log.py
@@ -24,9 +24,7 @@ def setup_logging(path=get_path('logging.json'),
     if value:
         path = value
 
-    print(level)
     level = getattr(logging, level.upper())
-    print(level)
     if os.path.exists(path):
         logtype = os.path.splitext(os.path.basename(path))[1]
         with open(path, 'rt') as f:
-- 
GitLab