<commit_before>package com.azavea.rf.tile.routes

import com.azavea.rf.tile.image._
import com.azavea.rf.database.Database

import geotrellis.raster._
import geotrellis.raster.render._
import geotrellis.raster.io._
import geotrellis.raster.op._
import geotrellis.raster.render.{Png, ColorRamp, ColorMap}
import geotrellis.raster.io.geotiff._
import geotrellis.vector.Extent
import geotrellis.spark._
import geotrellis.proj4.CRS
import akka.http.scaladsl.server._
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.model.{ContentType, HttpEntity, HttpResponse, MediaTypes}
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
import com.typesafe.scalalogging.LazyLogging
import spray.json._

import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent._
import java.util.UUID

// TODO: I need a better way to bind shit ... Right now I just swap out Var for Op ...

object ToolRoutes extends LazyLogging {
  val userId: String = "rf_airflow-user"

  val red = Op('red)
  val nir = Op('nir)
  val ndvi = (nir - red) / (nir + red)

  def ndvi0 = {
    val params0 = Map(
      Op.Var('red) -> Op("LC8_0[3]"),
      Op.Var('nir) -> Op("LC8_0[4]"))
    ndvi.bind(params0)
  }

  def ndvi1 = {
    val params1 = Map(
      Op.Var('red) -> Op("LC8_1[3]"),
      Op.Var('nir) -> Op("LC8_1[4]"))
    ndvi.bind(params1)
  }<commit_msg>Improve TODO comment<commit_after>package com.azavea.rf.tile.routes

import com.azavea.rf.tile.image._
import com.azavea.rf.database.Database

import geotrellis.raster._
import geotrellis.raster.render._
import geotrellis.raster.io._
import geotrellis.raster.op._
import geotrellis.raster.render.{Png, ColorRamp, ColorMap}
import geotrellis.raster.io.geotiff._
import geotrellis.vector.Extent
import geotrellis.spark._
import geotrellis.proj4.CRS
import akka.http.scaladsl.server._
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.model.{ContentType, HttpEntity, HttpResponse, MediaTypes}
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
import com.typesafe.scalalogging.LazyLogging
import spray.json._

import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent._
import java.util.UUID

// TODO: I need a better way to bind ops ... Right now I just swap out Var for Op ...

object ToolRoutes extends LazyLogging {
  val userId: String = "rf_airflow-user"

  val red = Op('red)
  val nir = Op('nir)
  val ndvi = (nir - red) / (nir + red)

  def ndvi0 = {
    val params0 = Map(
      Op.Var('red) -> Op("LC8_0[3]"),
      Op.Var('nir) -> Op("LC8_0[4]"))
    ndvi.bind(params0)
  }

  def ndvi1 = {
    val params1 = Map(
      Op.Var('red) -> Op("LC8_1[3]"),
      Op.Var('nir) -> Op("LC8_1[4]"))
    ndvi.bind(params1)
  }
{'fraction_non_alphanumeric': 0.13005780346820808, 'fraction_numerical': 0.013728323699421965, 'mean_word_length': 3.9008849557522125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 1, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '412540', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1052, 'n_words': 212}