CosmiQ / solaris

CosmiQ Works Geospatial Machine Learning Analysis Toolkit
https://solaris.readthedocs.io
Apache License 2.0
411 stars 112 forks source link

Fix tiling issue in raster_tile.py #452

Open srmsoumya opened 2 years ago

srmsoumya commented 2 years ago

Description

Raster tiler is missing a few tiles while creating the chips. Rounding the profile["transform"] to 3 decimal places is creating the issue of chips overwrite, changing this to 6 decimal places fixes the issue.

Type of change

Checklist:

If your PR does not fulfill all of the requirements in the checklist above, that's OK! Just prepend [WIP] to the PR title until they are all satisfied. If you need help, @-mention a maintainer and/or add the Status: Help Needed label.

srmsoumya commented 2 years ago

@rbavery I was able to reproduce the test errors locally.

The array values are different for tiles in

Visually they look similar but array values are different. eg:

Screenshot 2022-03-17 at 6 31 15 PM

We are just changing the precision for file names, everything else remains the same. Is it because we changed from

-  opencv-python>=4.1
+  opencv>=4.5.5
rbavery commented 2 years ago

@srmsoumya looking at your recent commit and just a heads up, using opencv appears to be what works for recent releases so I think we should stick to that. See https://github.com/CosmiQ/solaris/issues/461