Skip to content

Commit

Permalink
add scala test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
iGN5117 committed Dec 5, 2023
1 parent d376116 commit 69af41c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ object Catalog {
function[RS_AsImage](),
function[RS_ZonalStats](),
function[RS_ZonalStatsAll](),
function[RS_Resample]()
function[RS_Resample](),
function[RS_FromNetCDF](),
function[RS_NetCDFInfo]()
)

val aggregateExpressions: Seq[Aggregator[Geometry, Geometry, Geometry]] = Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,23 @@ case class RS_MakeEmptyRaster(inputExpressions: Seq[Expression])
copy(inputExpressions = newChildren)
}
}


case class RS_FromNetCDF(inputExpressions: Seq[Expression])
extends InferredExpression(
inferrableFunction2(RasterConstructors.fromNetCDF), inferrableFunction4(RasterConstructors.fromNetCDF)) {

override def foldable: Boolean = false
protected def withNewChildrenInternal(newChildren: IndexedSeq[Expression]) = {
copy(inputExpressions = newChildren)
}
}

case class RS_NetCDFInfo(inputExpressions: Seq[Expression])
extends InferredExpression(RasterConstructors.getRecordInfo _) {

protected def withNewChildrenInternal(newChildren: IndexedSeq[Expression]) = {
copy(inputExpressions = newChildren)
}
}

0 comments on commit 69af41c

Please sign in to comment.