[postgis-tickets] [PostGIS] #3244: ST_3DClosestPoint returns garbage in Z for 3dz-2d arg

PostGIS trac at osgeo.org
Wed Aug 19 14:46:27 PDT 2015


#3244: ST_3DClosestPoint returns garbage in Z for 3dz-2d arg
----------------------+---------------------------
  Reporter:  strk     |      Owner:  nicklas
      Type:  defect   |     Status:  new
  Priority:  high     |  Milestone:  PostGIS 2.2.0
 Component:  postgis  |    Version:  trunk
Resolution:           |   Keywords:
----------------------+---------------------------

Comment (by nicklas):

 Thank Paul and strk for finding it and pointing at the problem

 I suggest using a maximum/minimum int32 as max and min value for the
 vertical line.

 I added it in r13946 and it seems to work.

 That means that if the result should be outside that min/max values it
 will fall back to the max/min values.

 Is that acceptable?

 Should we detect that and give a warning?

 I didn't dare using int64 since I don't know if that might give problems
 on some systems (didn't even test on mine actually)

 But since I define the limit as 1<<32 for the max int32 we could use 1<<50
 instead, which probably is safe.

 But it is quite ugly to just "pick a number".

--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3244#comment:7>
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