Skip to content

Commit

Permalink
flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan D. Snow committed Jun 10, 2017
1 parent 827b759 commit 711e815
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/test_grid_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_gdal_grid_projection(prep, tgrid):
'0.0174532925199433],AUTHORITY["EPSG","4326"]]')
assert ggrid.proj4 == '+proj=longlat +datum=WGS84 +no_defs '


def test_gdal_grid(prep, tgrid):
"""
Tests test_gdal_grid
Expand Down Expand Up @@ -96,11 +96,11 @@ def test_gdal_grid(prep, tgrid):
assert ggrid.epsg == '4326'
sp_ref = osr.SpatialReference()
sp_ref.ImportFromEPSG(32651)

latitude, longitude = ggrid.latlon
assert latitude.shape == (120, 120)
assert longitude.shape == (120, 120)
assert_almost_equal(latitude[20:22, 20:22],
assert_almost_equal(latitude[20:22, 20:22],
[[15.83736111, 15.83736111],
[15.82902778, 15.82902778]])
assert_almost_equal(longitude[20:22, 20:22],
Expand Down Expand Up @@ -200,15 +200,15 @@ def test_array_grid(prep):
assert ggrid.proj4 == arrg.proj4
assert (ggrid.np_array() == arrg.np_array()).all()


def test_array_grid3d(prep):
"""
Test array grid 3d version
"""
input_raster, compare_path = prep
ggrid = GDALGrid(input_raster)
orig_array = ggrid.np_array(masked=True)
grid_array = np.array([orig_array, 5*orig_array, 4*orig_array])
grid_array = np.array([orig_array, 5 * orig_array, 4 * orig_array])
arrg = ArrayGrid(in_array=grid_array,
wkt_projection=ggrid.wkt,
geotransform=ggrid.geotransform)
Expand All @@ -227,5 +227,4 @@ def test_utm_from_latlon():
Test retrieving a UTM projection from a latitude and longitude
"""
assert utm_proj_from_latlon(-25.2744, 133.7751) == \
'+proj=utm +zone=53 +south +datum=WGS84 +units=m +no_defs '

'+proj=utm +zone=53 +south +datum=WGS84 +units=m +no_defs '

0 comments on commit 711e815

Please sign in to comment.