Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class RasterRefBench extends SparkEnv with LazyLogging {
val r2 = RFRasterSource(remoteCOGSingleband2)

singleDF = Seq((r1, r2)).toDF("B1", "B2")
.select(RasterRefToTile(RasterSourceToRasterRefs(Some(r1.dimensions), Seq(0), $"B1", $"B2")))
.select(RasterRefToTile(RasterSourceToRasterRefs(Some(r1.dimensions), Seq(0), 0: Short, $"B1", $"B2")))

expandedDF = Seq((r1, r2)).toDF("B1", "B2")
.select(RasterRefToTile(RasterSourceToRasterRefs($"B1", $"B2")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TileEncodeBench extends SparkEnv {
case "rasterRef" ⇒
val baseCOG = "https://s3-us-west-2.amazonaws.com/landsat-pds/c1/L8/149/039/LC08_L1TP_149039_20170411_20170415_01_T1/LC08_L1TP_149039_20170411_20170415_01_T1_B1.TIF"
val extent = Extent(253785.0, 3235185.0, 485115.0, 3471015.0)
tile = RasterRefTile(RasterRef(RFRasterSource(URI.create(baseCOG)), 0, Some(extent), None))
tile = RasterRefTile(RasterRef(RFRasterSource(URI.create(baseCOG)), 0, Some(extent), None, 0))
case _ ⇒
tile = randomTile(tileSize, tileSize, cellTypeName)
}
Expand All @@ -73,4 +73,3 @@ class TileEncodeBench extends SparkEnv {
boundEncoder.fromRow(row)
}
}

8 changes: 7 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ addCommandAlias("previewSite", "docs/previewSite")
addCommandAlias("ghpagesPushSite", "docs/ghpagesPushSite")
addCommandAlias("console", "datasource/console")

clippyColorsEnabled := true

// Prefer our own IntegrationTest config definition, which inherits from Test.
lazy val IntegrationTest = config("it") extend Test

Expand Down Expand Up @@ -113,12 +115,17 @@ lazy val datasource = project
spark("mllib").value % Provided,
spark("sql").value % Provided
),
scalacOptions in (Compile, console) ~= { _.filterNot(Set("-Ywarn-unused-import", "-Ywarn-unused:imports")) },
scalacOptions in (Test, console) ~= { _.filterNot(Set("-Ywarn-unused-import", "-Ywarn-unused:imports")) },
clippyColorsEnabled := true,
console / initialCommands := (console / initialCommands).value +
"""
|import org.locationtech.rasterframes.datasource.geotrellis._
|import org.locationtech.rasterframes.datasource.geotiff._
|import org.locationtech.rasterframes.datasource.raster._
|""".stripMargin,
IntegrationTest / fork := true,
Test / fork := true,
IntegrationTest / javaOptions := Seq("-Xmx3g")
)

Expand Down Expand Up @@ -180,4 +187,3 @@ lazy val docs = project
lazy val bench = project
.dependsOn(core % "compile->test")
.settings(publish / skip := true)

Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class RasterRefIT extends TestEnvironment {
// [west, south, east, north]
val area = Extent(31.115, 29.963, 31.148, 29.99).reproject(LatLng, redScene.crs)

val red = RasterRef(redScene, 0, Some(area), None)
val green = RasterRef(RFRasterSource(scene(3)), 0, Some(area), None)
val blue = RasterRef(RFRasterSource(scene(2)), 0, Some(area), None)
val red = RasterRef(redScene, 0, Some(area), None, 0)
val green = RasterRef(RFRasterSource(scene(3)), 0, Some(area), None, 0)
val blue = RasterRef(RFRasterSource(scene(2)), 0, Some(area), None, 0)

val rf = Seq((red, green, blue)).toDF("red", "green", "blue")
val df = rf.select(
Expand All @@ -54,7 +54,7 @@ class RasterRefIT extends TestEnvironment {
stats should be ('defined)
stats.get.dataCells shouldBe > (1000L)
}

import geotrellis.raster.io.geotiff.compression.DeflateCompression
import geotrellis.raster.io.geotiff.tags.codes.ColorSpace
import geotrellis.raster.io.geotiff.{GeoTiffOptions, MultibandGeoTiff, Tiled}
Expand Down
Loading