Skip to content

Commit

Permalink
Merge pull request #140 from mhearne-usgs/padfix
Browse files Browse the repository at this point in the history
Adding one more pixel of padding in reader function so that we're gua…
  • Loading branch information
mhearne-usgs authored Apr 22, 2020
2 parents 6302aae + e022720 commit ce270bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ conda --version
if [ $? -ne 0 ]; then
echo "No conda detected, installing miniconda..."

curl $mini_conda_url -o miniconda.sh;
curl -L $mini_conda_url -o miniconda.sh;
echo "Install directory: $HOME/miniconda"

bash miniconda.sh -f -b -p $HOME/miniconda
Expand Down
10 changes: 5 additions & 5 deletions mapio/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ def _geodict_to_window(geodict, src, pad=False):
dx = geodict.dx
dy = geodict.dy

# if padding requested, add one set of pixels all the way around
# if padding requested, add TWO sets of pixels all the way around
xmin = geodict.xmin
xmax = geodict.xmax
ymin = geodict.ymin
ymax = geodict.ymax
if pad:
xmin -= dx
xmax += dx
ymin -= dy
ymax += dy
xmin -= dx * 2
xmax += dx * 2
ymin -= dy * 2
ymax += dy * 2

# convert from pixel registered to gridline registered
west = xmin - dx / 2.0
Expand Down

0 comments on commit ce270bb

Please sign in to comment.