[postgis-tickets] [PostGIS] #2034: ST_3DClosestPoint with mixed dimensionality in input values

PostGIS trac at osgeo.org
Tue Jul 14 09:16:04 PDT 2015


#2034: ST_3DClosestPoint with mixed dimensionality in input values
--------------------------+---------------------------
  Reporter:  nicklas      |      Owner:  nicklas
      Type:  enhancement  |     Status:  closed
  Priority:  high         |  Milestone:  PostGIS 2.2.0
 Component:  postgis      |    Version:  trunk
Resolution:  fixed        |   Keywords:
--------------------------+---------------------------
Changes (by nicklas):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 Fixed in r13802 and r13803

 Here is the deal:
 For distance calculations:
 reverts to 2d calculation. That should give the same answer as "any"
 z-value on geometry with unknown z-value.

 For shortest line calculations:
 The side of the shortestline without input of z-value will get the same
 z-value as the other side.

 For furthestline:
 This one is ugly, but the side of the furthest line without input of
 z-value gets maximun float value as z-value FLT_MAX

 For closest point:
 Same as shortest line.


 This is done with shortestline, longest line and closest point by first
 doing a 2d calculation. Then creating a long vertical line (z-value from
 FLT_MIN to FLT_MAX) at the resulting point with unknown z-value and then
 running that line against the original geometry with z-value in the 3d-
 calculation.

 I'm quite happy with the solution, but how does it compare to the behavior
 of sfcgal-versions?

 I close it. Reopen if there is disagreement abut the solution.

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