diff --git a/src/main/scala/demo/Main.scala b/src/main/scala/demo/Main.scala index 51bfdfb..417717b 100644 --- a/src/main/scala/demo/Main.scala +++ b/src/main/scala/demo/Main.scala @@ -1,5 +1,6 @@ package demo +import math._ import geotrellis.raster._ import geotrellis.spark._ @@ -7,6 +8,9 @@ object Main { def helloSentence = "Hello GeoTrellis" def main(args: Array[String]): Unit = { - println(helloSentence) + val data = for (y <- -10 to 10; x <- -40 to 40) yield -cos(0.2 * x + 0.25 * y) - cos(-0.1 * x + 0.45 * y) + val tile = DoubleArrayTile(data.toArray, 81, 21) + val art = tile.renderAscii(geotrellis.raster.render.ascii.AsciiArtEncoder.Palette.HATCHING) + println(art.patch(art.length / 2 - helloSentence.length / 2, helloSentence, helloSentence.length)) } }