Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tiling issue in raster_tile.py #452

Open
wants to merge 13 commits into
base: 0.5.0
Choose a base branch
from
4 changes: 1 addition & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Test Python package

on:
- push
on: [push, pull_request]

jobs:
test:
Expand Down Expand Up @@ -50,4 +49,3 @@ jobs:
run: tox -e format
- name: Test with tox
run: tox -e test

4 changes: 2 additions & 2 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ dependencies:
- geopandas>=0.7.0
- matplotlib>=3.1.2
- numpy>=1.17.3
- opencv-python>=4.1
- opencv>=4.5.5
- pandas>=0.25.3
- pyproj>=2.1
- PyYAML>=5.4
- rasterio>=1.0.23
- requests==2.22.0
- requests>=2.27.1
- rtree>=0.9.3
- scikit-image>=0.16.2
- scipy>=1.3.2
Expand Down
10 changes: 5 additions & 5 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ shapely>=1.8.0
tqdm>=4.40.0
urllib3<1.26
# testing requirements
black
black==22.1.0
pytest
tox
isort
flake8
pre-commit
tox==3.24.5
isort==5.10.1
flake8==4.0.1
pre-commit
4 changes: 2 additions & 2 deletions solaris/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from . import data, utils, vector # noqa: F401
from . import data, tile, utils, vector # noqa: F401

# data, eval, preproc, raster, tile, have gdal in them need to replace with rasterio
__version__ = "0.0.1"
__version__ = "0.5.0"
5 changes: 2 additions & 3 deletions solaris/tile/raster_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ def save_tile(self, tile_data, mask, profile, dest_fname_base=None):
if self.proj_unit not in ["meter", "metre"]:
dest_fname = "{}_{}_{}.tif".format(
dest_fname_root,
np.round(profile["transform"][2], 3),
np.round(profile["transform"][5], 3),
np.round(profile["transform"][2], 6),
np.round(profile["transform"][5], 6),
)
else:
dest_fname = "{}_{}_{}.tif".format(
Expand All @@ -537,7 +537,6 @@ def save_tile(self, tile_data, mask, profile, dest_fname_base=None):
dest.write(mask, profile["count"] + 1)

dest.close()

return dest_path

# if self.cog_output:
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.