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.

FunctionSyntax
Pythonis_fully_masked(raster_col)
SQLRT_IsFullyMasked(raster_col)
ScalaisFullyMasked(raster)

For more details, go to the GeoAnalytics Engine API reference for is_fully_masked.

Examples

PythonPythonSQLScala
Use dark colors for code blocksCopy
1
2
3
4
5
6
7

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
Use dark colors for code blocksCopy
1
2
3
4
5
+------------+
|fully_masked|
+------------+
|false       |
+------------+

Version table

ReleaseNotes

2.1.0

Python, SQL, and Scala functions introduced

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.