RT_IsFullyMasked takes a raster column and returns a boolean column. The output returns true if all pixels in all the bands of the raster are masked; otherwise, it returns false. A masked pixel is a cell that is marked as NoData and will not be used for analysis.
| Function | Syntax |
|---|---|
| Python | is |
| SQL | RT |
| Scala | is |
For more details, go to the GeoAnalytics Engine API reference for is_fully_masked.
Examples
from geoanalytics.raster import functions as RT
df = spark.sql("SELECT array(1, 2, 3, 4) AS pixels") \
.withColumn("raster", RT.srid(RT.create_raster("pixels", 2, 2, "float32"), 4326))
df.select(RT.is_fully_masked("raster").alias("fully_masked")).show(truncate=False)Result
+------------+
|fully_masked|
+------------+
|false |
+------------+Version table
| Release | Notes |
|---|---|
2.1.0 | Python, SQL, and Scala functions introduced |