GitHub user melikasajadian added a comment to the discussion: RS_MapAlgebra for 
raster processing

@jiayuasu Thank you for the response. Yes, both jar files are in the 
init_script of the cluster following the instruction 
[here](https://sedona.apache.org/latest/setup/databricks/) with runtime 15.4 
LTS (includes Apache Spark 3.5.0, Scala 2.12). I did verify if the jar files 
are also available in classpath entries in the Spark UI:

/databricks/jars/sedona-spark-shaded-3.5_2.12-1.7.1.jar
/databricks/jars/geotools-wrapper-1.7.1-28.5.jar

![image](https://github.com/user-attachments/assets/08420dbe-7b88-44b7-812b-507efebcca05)

As I mentioned for example this code works perfectly fine:
ndgi_df = spark.sql("select *, RS_Divide(RS_Subtract(RS_BandAsArray(raster, 2), 
RS_BandAsArray(raster, 1)), RS_Add(RS_BandAsArray(raster, 2), 
RS_BandAsArray(raster, 1))) AS ndgi from neon")
ndgi_df.createOrReplaceTempView("ndgi")
display(ndgi_df)

Only the below one gives an error that it cannot find the geosolutions jiffle 
class:
ndgi_df = sedona.sql("""
SELECT 
  RS_MapAlgebra(raster, 'D', 'out = ((rast[1] - rast[0]) / (rast[1] + 
rast[0]));') 
AS raster
FROM neon
""")
ndgi_df.createOrReplaceTempView("ndgi")
display(ndgi_df)

Is there anything else that I can check?

GitHub link: 
https://github.com/apache/sedona/discussions/1945#discussioncomment-13270822

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to