Kengo Seki created SEDONA-145:
---------------------------------

             Summary: Fix ST_AsEWKT to reserve the Z coordinate
                 Key: SEDONA-145
                 URL: https://issues.apache.org/jira/browse/SEDONA-145
             Project: Apache Sedona
          Issue Type: Improvement
            Reporter: Kengo Seki


Currently, ST_AsEWKT drops the Z coordinate, while ST_AsText reserves it.

{code}
scala> spark.sql("SELECT ST_AsText(ST_Point(0.0, 0.0, 0.0))").show()
+----------------------------------+
|st_astext(st_point(0.0, 0.0, 0.0))|
+----------------------------------+
|                    POINT Z(0 0 0)|
+----------------------------------+

scala> spark.sql("SELECT ST_AsEWKT(ST_Point(0.0, 0.0, 0.0))").show()
+----------------------------------+
|st_asewkt(st_point(0.0, 0.0, 0.0))|
+----------------------------------+
|                       POINT (0 0)|
+----------------------------------+
{code}

As far as I can see, Sedona's 3D support is limited as of now, but a few 
functions (e.g., ST_3DDistance) support it, so the Z coordinate should be 
reserved.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to