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

GeoTiffRasterSource TiledToLayout reads by SpatialKey can produce non-256x256 tiles #3267

Closed
jisantuc opened this issue Jul 10, 2020 · 1 comment · Fixed by #3270
Closed
Assignees
Labels

Comments

@jisantuc
Copy link
Contributor

jisantuc commented Jul 10, 2020

Describe the bug

Using ZoomedLayoutScheme(WebMercator) to transform between keys and extents, it's possible to read a z/x/y tile and get a non-256x256 tile back.

To Reproduce

Here's a Scala worksheet that reproduces the issue. I'm attaching small-cog.zip, which contains a zip of the cog referred to here as well. The attached COG has 1s for data and 0s for nodata. At the requested zoom level and keys in this worksheet, everything is data.

<redacted in favor of copy in test bundle in next comment>

Expected behavior

All of the debug info should print 65536 (=256x256) for the tile size and sum, instead of inconsistent (sometimes 255x255, sometimes 255x256) sums.

Environment

  • Java version: 1.8.0_252
  • Scala version: 2.12.11
  • GeoTrellis version: 3.4.0

small-cog.zip

@pomadchin pomadchin added the bug label Jul 10, 2020
@jisantuc
Copy link
Contributor Author

jisantuc commented Jul 10, 2020

Here's a slightly improved testing bundle:

test-bundle.zip

Each tif named seams-x.tif has a known issue with seams at the zoom level in its file name. To see the issues, you can run the script in the bundle (improved from the pasted version above to do the same resampling and reprojection we do in Raster Foundry). Set testZoomLevel to the level in the file name and point to seams-x.tif just below the imports, then run as amm test-script.worksheet.sc.

@pomadchin pomadchin self-assigned this Jul 13, 2020
@pomadchin pomadchin changed the title Reads with WebMercator SpatialKeys can produce non-256x256 tiles GeoTiffRasterSource TiledToLayout reads by SpatialKey can produce non-256x256 tiles Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants