Skip to content

RT_CellSizeY takes a raster column and returns a numeric value that represents the dimension on a raster cell in the vertical direction (y-coordinate).

FunctionSyntax
Pythoncell_size_y(raster_col)
SQLRT_CellSizeY(raster_col)
ScalacellSizeY(raster)

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

Examples

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

from geoanalytics.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_y("raster").alias("cell_size_y")).show()
Result
Use dark colors for code blocksCopy
1
2
3
4
5
+-----------+
|cell_size_y|
+-----------+
|        1.0|
+-----------+

Version table

ReleaseNotes

2.0.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.