Skip to content

Commit

Permalink
fixed error in RST_WorldToRasterCoordY (was returning x)
Browse files Browse the repository at this point in the history
  • Loading branch information
sllynn committed Sep 24, 2024
1 parent d44eb0b commit 5dabff7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ case class RST_WorldToRasterCoordX(
*/
override def rasterTransform(tile: MosaicRasterTile, arg1: Any, arg2: Any): Any = {
val xGeo = arg1.asInstanceOf[Double]
val yGeo = arg2.asInstanceOf[Double]
val gt = tile.getRaster.getRaster.GetGeoTransform()
GDAL.fromWorldCoord(gt, xGeo, 0)._1
GDAL.fromWorldCoord(gt, xGeo, yGeo)._1
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ case class RST_WorldToRasterCoordY(
*/
override def rasterTransform(tile: MosaicRasterTile, arg1: Any, arg2: Any): Any = {
val xGeo = arg1.asInstanceOf[Double]
val yGeo = arg2.asInstanceOf[Double]
val gt = tile.getRaster.getRaster.GetGeoTransform()
GDAL.fromWorldCoord(gt, xGeo, 0)._2
GDAL.fromWorldCoord(gt, xGeo, yGeo)._2
}

}
Expand Down

0 comments on commit 5dabff7

Please sign in to comment.