Uploaded image for project: 'Apache Sedona'
  1. Apache Sedona
  2. SEDONA-145

Fix ST_AsEWKT to reserve the Z coordinate

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0

    Description

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

      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)|
      +----------------------------------+
      

      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.

      Attachments

        Issue Links

          Activity

            People

              sekikn Kengo Seki
              sekikn Kengo Seki
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m