-
Notifications
You must be signed in to change notification settings - Fork 364
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
Issue reading Extent from GeoTiff - offset encountered #1574
Comments
Is this still relevant? |
Potentially, can you add the test to master and see if it fails? lossyrob@d6d82ee |
Sure. |
On master with your commit cherry-picked: [info] - Fails to read correct extent *** FAILED ***
[info] Extent(1.0, 0.0, 11.0, 10.0) was not equal to Extent(0.5, 0.5, 10.5, 10.5) (FailingTestCase.scala:36) |
From
|
The major Haskell image IO library couldn't parse the GeoTIFF.
|
Debugged from
|
More importantly:
Whatever these "tie points" are, they're coming right out of the tags as whole numbers. That's consistent with what
|
From what I can see of the code that's here, no one is misbehaving. private def tiePointsModelSpace(tiePoints: Array[(Pixel3D, Pixel3D)],
pixelScaleOption: Option[(Double, Double, Double)]) =
pixelScaleOption match {
case Some(pixelScales) => {
def modelFunc(pixel: Pixel3D) = {
val (first, second) = tiePoints.head
val scaleX = (pixel.x - first.x) * pixelScales._1
val scaleY = (pixel.y - first.y) * pixelScales._2
val scaleZ = (pixel.z - first.z) * pixelScales._3
Pixel3D(scaleX + second.x, second.y - scaleY, scaleZ + second.z)
}
getExtentFromModelFunction(modelFunc)
}
...
}
What I'm curious about is how |
Notice |
I think we could get the bottom of this together fairly quickly on Monday, @lossyrob . |
There's model tie points in that raster, and those should be accounted for - somehow this logic here is not accounting for it properly: geotrellis/raster/src/main/scala/geotrellis/raster/io/geotiff/tags/TiffTags.scala Line 178 in 9fc2980
|
See the failing test on this branch: https://github.com/lossyrob/geotrellis/tree/bugreport/offset-geotiff-extent
The text was updated successfully, but these errors were encountered: