Skip to content

Commit

Permalink
negated
Browse files Browse the repository at this point in the history
  • Loading branch information
sllynn committed Nov 20, 2023
1 parent 3c5ab2e commit c0bc079
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ class MosaicRasterGDAL(

if (json.contains("STATISTICS_VALID_PERCENT")) {
json("STATISTICS_VALID_PERCENT").asInstanceOf[Double] == 0.0
} else if (json.contains("bands") && json("bands").asInstanceOf[List[Any]].nonEmpty) {
!json("bands")
.asInstanceOf[List[Map[String, Any]]]
.flatMap(i => i("metadata").asInstanceOf[Map[String, Any]].values)
.asInstanceOf[List[Map[String, Any]]]
.exists(m => m.getOrElse("STATISTICS_VALID_PERCENT", "0").toString.toDouble > 0.0)
} else if (subdatasets.nonEmpty) {
false
} else {
Expand Down

0 comments on commit c0bc079

Please sign in to comment.