[PostGIS] #5822: Incorrect Output for ST_ASEWKT with "LINESTRING Z"

PostGIS trac at osgeo.org
Fri Dec 20 12:24:28 PST 2024


#5822: Incorrect Output for ST_ASEWKT with "LINESTRING Z"
----------------------+---------------------------
  Reporter:  bitner   |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  medium   |  Milestone:  PostGIS 3.6.0
 Component:  postgis  |    Version:  3.1.x
Resolution:           |   Keywords:  WKT
----------------------+---------------------------
Changes (by robe):

 * milestone:  PostGIS 3.5.1 => PostGIS 3.6.0
 * version:  3.4.x => 3.1.x

Comment:

 This looks to be an issue that has existed for a while.  Even testing on
 PostGIS 3.1, I see it returning


 {{{
  SELECT ST_AsEWKT(ST_GeomFromText('LINESTRING Z(-71.160281 42.258729
 1.0,-71.160837 42.259113 2.0,-71.161144 42.25932 3.0)'));
 }}}

 {{{
 LINESTRING(-71.160281 42.258729 1,-71.160837 42.259113 2,-71.161144
 42.25932 3)
 }}}


 So if we change this behavior, we can't do it until 3.6.0 (can't go into
 micros).

 I'm not sure it's worth fixing cause I think OGC concerned apps would be
 using ST_ASText and ST_AsEWKT has always been our own home grown WKT to
 serve our purposes.  I'm more concerned about breaking existing apps that
 rely on this old behavior than doing the  "Right thing" here.

 @pramsey @strk you have any thoughts on this.

 At anyrate I think we should all agree this can't go in as a micro change.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5822#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list