locationtech / locationtech/geotrellis
LayoutTileSource.requireGridAligned is failing with GDALRasterSource
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.4k
- Forks
- 360
- Avg merge
- 6h 57m
- Merged PRs (30d)
- 12
Description
Describe the bug
When I try to create a RasterSourceRDD from the GeoTIFF provided below with the GDALRasterSource driver, this requirement is not respected and this causes an Executor error .
To Reproduce
See the following code: https://gist.github.com/jdenisgiguere/9256cec690c335f6a993866b71a99878
a sample image is available here:
https://drive.google.com/file/d/18e6LtenDaHFVkU_D65oZrkmNaCv0SECC/view?usp=sharing
- Actual output
The error message looks like:
0/09/09 15:45:24 ERROR Executor: Exception in task 0.0 in stage 1.0 (TID 1)
java.lang.IllegalArgumentException: requirement failed: x-aligned: offset by CellSize(0.3,0.3) 0.22367999985969317
at scala.Predef$.require(Predef.scala:281)
at geotrellis.layer.LayoutTileSource$.geotrellis$layer$LayoutTileSource$$requireGridAligned(LayoutTileSource.scala:216)
More log at:
https://gist.github.com/jdenisgiguere/9256cec690c335f6a993866b71a99878#file-log
- Expected output
I would expect to be able to create a RasterSourceRDD with GDALRasterSource as I can with GeotiffRasterSource.
Expected behavior
I would expect to be able to create a RasterSourceRDD with GDALRasterSource as I can with GeotiffRasterSource.
Environment
- Java version: OpenJDK Runtime Environment (build 1.8.0_265-8u265-b01-0ubuntu2~18.04-b01)
- Scala version: 2.12.10
- GeoTrellis version: 3.5.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with LayoutTileSource.scala lines 210-217 and reproduce the failure using the linked gist, sample GeoTIFF, and log. Compare RasterSourceRDD creation through GDALRasterSource and GeotiffRasterSource, then verify that the GDAL path no longer raises the x-alignment Executor error and produces the expected RasterSourceRDD.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100