You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sedona.apache.org by "umartin (via GitHub)" <gi...@apache.org> on 2023/03/22 16:36:03 UTC

[GitHub] [sedona] umartin commented on issue #807: Writing dataframe to Postgresql (Postgis-Extension) DB fails

umartin commented on issue #807:
URL: https://github.com/apache/sedona/issues/807#issuecomment-1479903031

   Hi @conect!
   
   Postgis doesn't understand the Sedona internal serialization format. The native postgis protocol uses EWKB for geometries. Try converting the geometry with ST_AsEWKB before writing to postgis.
   
   `Dataset<Row> d2 = Adapter.toDf(spatialRDD1,spark).withColumn("geometry", expr("ST_AsEWKB(geometry)"));`
   
   Br,
   Martin Andersson
   


-- 
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-unsubscribe@sedona.apache.org

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