ricg72 opened a new issue, #1272:
URL: https://github.com/apache/sedona/issues/1272

   ## Expected behavior
   ST_Pixelize returns 0 pixels
   
   ## Actual behavior
   ST_Pixelize throw assertion:
   
   Caused by: java.lang.AssertionError: assertion failed
        at scala.Predef$.assert(Predef.scala:208)
        at 
org.apache.spark.sql.sedona_viz.expressions.ST_Pixelize.eval(Pixelize.scala:119)
        at 
org.apache.spark.sql.catalyst.expressions.Alias.eval(namedExpressions.scala:160)
   
   ## Steps to reproduce the problem
   case class A(g : String)
   val a0 = "3.1" // change a0,a1 to values so an integer point lies between 
them
   val a1 = "3.8"
   val d = Seq( A(s"POLYGON (($a0 $a0, $a1 $a0, $a1 $a1, $a0 $a1, $a0 $a0))"))
   import spark.implicits._
   val df = d.toDS().toDF()  .withColumn("geo", expr("ST_GeomFromWKT(g)"))  
.withColumn("area", expr("ST_Area(geo)"))
   df.select("geo", "area").show(false)
   
   val df2 = df  .withColumn("px", expr("ST_Pixelize(geo, 10,10, 
ST_PolygonFromEnvelope(0,0,10,10))"))  .show(false)
   ## Settings
   
   Sedona version = 1.5.0
   Apache Spark version = 3.3.0
   Apache Flink version = ?
   API type = Scala
   Scala version = 2.12
   JRE version = 1.8
   Python version = not tested
   Environment = Databricks?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sedona.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to