Skip to content

Commit

Permalink
remove namespace hook; use new names in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
njwilson23 committed Sep 16, 2016
1 parent 616cd34 commit ce626f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
3 changes: 0 additions & 3 deletions karta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
geospatial data.
"""

import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)

__all__ = ["vector", "raster", "crs", "tile", "errors"]
from .version import __version__

Expand Down
16 changes: 8 additions & 8 deletions tests/geotiff_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def test_io(self):
g = karta.RegularGrid([15.0, 15.0, 30.0, 30.0, 0.0, 0.0], v, crs=utm7)

fpath = os.path.join(TMPDATA, "test.tif")
g.to_gtiff(fpath, compress=None)
gnew = karta.read_gtiff(fpath)
g.to_geotiff(fpath, compress=None)
gnew = karta.read_geotiff(fpath)

self.assertTrue("+proj=utm" in gnew.crs.get_proj4())
self.assertTrue("+zone=7" in gnew.crs.get_proj4())
Expand All @@ -47,8 +47,8 @@ def test_io_virtual(self):
g = karta.RegularGrid([15.0, 15.0, 30.0, 30.0, 0.0, 0.0], v, crs=utm7)

fpath = os.path.join(TMPDATA, "test.tif")
g.to_gtiff(fpath, compress=None)
gnew = karta.read_gtiff(fpath, in_memory=False)
g.to_geotiff(fpath, compress=None)
gnew = karta.read_geotiff(fpath, in_memory=False)

self.assertEqual(g.transform, gnew.transform)
self.assertEqual(g.values.dtype, gnew.values.dtype)
Expand All @@ -65,8 +65,8 @@ def test_write_compress(self):
g = karta.RegularGrid([15.0, 15.0, 30.0, 30.0, 0.0, 0.0], v, crs=utm7)

fpath = os.path.join(TMPDATA, "test.tif")
g.to_gtiff(fpath, compress="LZW")
g.to_gtiff(fpath, compress="PACKBITS")
g.to_geotiff(fpath, compress="LZW")
g.to_geotiff(fpath, compress="PACKBITS")
return

class GdalVirtualArrayTests(unittest.TestCase):
Expand All @@ -78,8 +78,8 @@ def setUp(self):
g = karta.RegularGrid([15.0, 15.0, 30.0, 30.0, 0.0, 0.0], v, crs=utm7)

fpath = os.path.join(TMPDATA, "test.tif")
g.to_gtiff(fpath, compress=None)
self.grid = karta.read_gtiff(fpath, in_memory=False)
g.to_geotiff(fpath, compress=None)
self.grid = karta.read_geotiff(fpath, in_memory=False)

def test_slicing_virtual(self):
self.grid[5:10, 7:15]
Expand Down

0 comments on commit ce626f0

Please sign in to comment.