Imbruced commented on PR #460:
URL: https://github.com/apache/sedona-db/pull/460#issuecomment-3677039224

   Hmm not sure why the step is failing :/ I included the serialization, using 
my messy code in the Apache Sedona Spark.
   
   I can run the following udf using Apache Sedona which runs SedonaDB
   
   ```python
   import pyarrow as pa
   import shapely
   import geoarrow.pyarrow as ga
   from sedonadb import udf
   
   @udf.arrow_udf(ga.wkb(), [udf.GEOMETRY, udf.NUMERIC])
   def shapely_udf(geom, distance):
       geom_wkb = pa.array(geom.storage.to_array())
       distance = pa.array(distance.to_array())
       geom = shapely.from_wkb(geom_wkb)
       result_shapely = shapely.buffer(geom, distance)
   
       return pa.array(shapely.to_wkb(result_shapely))
   ```
   
   which gives me the result as follows for my testing data
   
   ```
   +--------------------+
   |                geom|
   +--------------------+
   |POLYGON ((14.3093...|
   |POLYGON ((14.3177...|
   |POLYGON ((14.3891...|
   |POLYGON ((14.2185...|
   |POLYGON ((14.3595...|
   |POLYGON ((14.3855...|
   |POLYGON ((14.2739...|
   |POLYGON ((14.4047...|
   |POLYGON ((14.3120...|
   |POLYGON ((14.3630...|
   +--------------------+
   ```
   
   I think the current MR is ready and I'll continue working on the worker and 
Apache Sedona, SedonaDB strategy
   
   let me know what do you think 
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to