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

ST_Point inconsistencies

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Workaround
    • None
    • 1.4.0

    Description

      I was looking at adding null safety to ST_Point but stumbled upon some inconsistencies with Postgis and other Sedona constructors.

      ST_Point in Postgis takes an optional srid - as most constructors in Postgis and Sedona.

      ST_Point in Sedona takes an optional Z value - making the 3 argument version in Sedona very different from Postgis.

      Postgis has ST_Point, ST_PointZ, ST_PointM and ST_PointZM for points with different dimensions. All take an optional srid.

      Postgis also has ST_MakePoint which is similar to Sedona ST_Point.

      See: https://postgis.net/docs/ST_Point.html

       

      I see changing the semantics of ST_Point from x, y, z to z, y, srid as a no option.

       

      One possible upgrade path, if we want to align with Postgis, would be to:

      • Introduce ST_PointZ and possibly ST_MakePoint
      • Remove the optional third argument from ST_Point, forcing people to use the above for 3D points.
      • Once enough releases have passed and we're sure people have upgraded we can add an optional srid argument to ST_Point.

       

      Should we keep ST_Point as it is or align with Postgis using the plan above?

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              umartin Martin Andersson
              Votes:
              0 Vote for this issue
              Watchers:
              2 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