Skip to content

Commit

Permalink
✅ ⏪ Revert rasterio to 1.0.13 to fix unit tests
Browse files Browse the repository at this point in the history
Revert #90 to fix broken unit tests on the get_window_bounds and selective_tile functions in data_prep.ipynb. I've tracked it down to an incorrect affine output from dataset.transform. Seems to be a 'bug' introduced in rasterio version 1.0.14 (see #84), something with how the GDAL env is now set?

Also smallfix to remove read_table deprecation warning in pandas 0.24 (see #89), replacing with read_csv instead.
  • Loading branch information
weiji14 committed Feb 11, 2019
1 parent 73ad018 commit 22a1fc2
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ packaging = "==19.0"
pandas = "==0.24.1"
pyproj = "==1.9.6"
quilt = "==2.9.14"
rasterio = "==1.0.16"
rasterio = "==1.0.13"
requests = "==2.21.0"
scikit-image = "==0.14.2"
shapely = "==1.7a1"
Expand Down
100 changes: 50 additions & 50 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions data_prep.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"Geopandas : 0.4.0+26.g9e584cc\n",
"GMT : 0.0.1a0+16.g7004aa0\n",
"Numpy : 1.14.5\n",
"Rasterio : 1.0.16\n",
"Rasterio : 1.0.13\n",
"Scikit-image : 0.14.2\n",
"Xarray : 0.11.3\n"
]
Expand Down Expand Up @@ -622,7 +622,7 @@
" assert len(files) > 0 # check that there are actually files being matched!\n",
"\n",
" df = pd.concat(\n",
" pd.read_table(f, sep=sep, header=skip, names=names, usecols=usecols)\n",
" pd.read_csv(f, sep=sep, header=skip, names=names, usecols=usecols)\n",
" for f in files\n",
" )\n",
" df.reset_index(drop=True, inplace=True) # reset index after concatenation\n",
Expand Down
2 changes: 1 addition & 1 deletion data_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def ascii_to_xyz(pipeline_file: str) -> pd.DataFrame:
assert len(files) > 0 # check that there are actually files being matched!

df = pd.concat(
pd.read_table(f, sep=sep, header=skip, names=names, usecols=usecols)
pd.read_csv(f, sep=sep, header=skip, names=names, usecols=usecols)
for f in files
)
df.reset_index(drop=True, inplace=True) # reset index after concatenation
Expand Down

0 comments on commit 22a1fc2

Please sign in to comment.