[postgis-tickets] [PostGIS] #4827: Accept NaN from WKT parser

PostGIS trac at osgeo.org
Tue Jan 5 06:32:01 PST 2021


#4827: Accept NaN from WKT parser
---------------------+---------------------------
 Reporter:  strk     |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 3.1.1
Component:  postgis  |    Version:  master
 Keywords:           |
---------------------+---------------------------
 I know this is going to be controversial, but it doesn't seem good to me
 that the output of ST_AsText() cannot be read back by the WKT parser.
 Here's one such case:
 {{{
 select ST_AsText(ST_MakeLine(ST_MakePoint('NAN', 'NAN'),ST_MakePoint(0,
 0)));
 select ST_AsText(ST_MakeLine(ST_MakePoint('NAN', 'NAN'),ST_MakePoint(0,
 0)))::geometry;
 }}}

 The first statement works, outputting {{{LINESTRING(NaN NaN,0 0)}}}, the
 second statement, which tries reading that WKT back, fails with: {{{ERROR:
 parse error - invalid geometry}}}

 References #4825 as this limitation makes testing harder

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4827>
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