Skip to content

Commit 9e5b19c

Browse files
authored
Merge pull request #374 from s22s/fix/372.1
Additional fix for RasterRef delayed loading of header info.
2 parents 87a26e6 + bb81e33 commit 9e5b19c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/main/scala/org/locationtech/rasterframes/ref/RasterRef.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ case class RasterRef(source: RasterSource, bandIndex: Int, subextent: Option[Ext
4646
def cols: Int = grid.width
4747
def rows: Int = grid.height
4848
def cellType: CellType = source.cellType
49-
def tile: ProjectedRasterTile = ProjectedRasterTile(RasterRefTile(this), extent, crs)
49+
def tile: ProjectedRasterTile = RasterRefTile(this)
5050

5151
protected lazy val grid: GridBounds =
5252
subgrid.getOrElse(source.rasterExtent.gridBoundsFor(extent, true))

core/src/test/scala/org/locationtech/rasterframes/ref/RasterRefSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ class RasterRefSpec extends TestEnvironment with TestData {
258258
// SimpleRasterInfo is a proxy for header data requests.
259259
val start = SimpleRasterInfo.cacheStats.hitCount()
260260
val t: ProjectedRasterTile = RasterRefTile(subRaster)
261-
val result = Seq(t).toDF("tile").first()
261+
val result = Seq(t, subRaster.tile).toDF("tile").first()
262262
val end = SimpleRasterInfo.cacheStats.hitCount()
263263
end should be(start)
264264
}

0 commit comments

Comments
 (0)