Skip to content

RT_CellSizeX takes a raster column and returns a numeric value that represents the dimension on a raster cell in the horizontal direction (x-coordinate).

FunctionSyntax
Pythoncell_size_x(raster_col)
SQLRT_CellSizeX(raster_col)
ScalacellSizeX(raster)

For more details, go to the GeoAnalytics for Microsoft Fabric API reference for cell_size_x.

Examples

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

from geoanalytics_fabric.raster import functions as RT

data = [([1,2,3,4], )]
df = spark.createDataFrame(data, ["pixels"]) \
     .withColumn("raster", RT.create_raster("pixels", 2, 2, "int32"))

df.select(RT.cell_size_x("raster").alias("cell_size_x")).show()
Result
Use dark colors for code blocksCopy
1
2
3
4
5
+-----------+
|cell_size_x|
+-----------+
|        1.0|
+-----------+

Version table

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