Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the WKB of Geometry.
Syntax
getBytes()
Returns
bytes
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([ {'geomwkt': '''POINT(17 7)'''} ])
g = df.select(dbf.st_geomfromwkt(df.geomwkt).alias("geom")).head().geom
g.getBytes().hex()
# '010100000000000000000031400000000000001c40'