[postgis-devel] [PostGIS] #576: 3d distance functions

PostGIS trac at osgeo.org
Tue Aug 24 12:24:27 PDT 2010


#576: 3d distance functions
-------------------------+--------------------------------------------------
 Reporter:  nicklas      |       Owner:  nicklas      
     Type:  enhancement  |      Status:  assigned     
 Priority:  medium       |   Milestone:  PostGIS 2.0.0
Component:  postgis      |     Version:  trunk        
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by nicklas):

 Ok, I will add it to trunk. I think it is quite safe so far. It is almost
 just a copy of the 2D functions. The iterations through the geometries is
 the same and for the point-point and point-line it is just about adding
 the extra dimension in the algoritms.

 I have some questions:

 1.  Is it ok to keep the 3d-functions in another source-file? If so I
 would like to also move the length3d functions there. I think it will be a
 little messy to have it all in measures.c.

 2. As it is now I am not trying to catch when there is no Z-value present
 but rely on function getPoint3dz_p puts 0.0 for z-value when I retrive the
 point. Is that secure enough. I see in lwgeom_pointarray_length that there
 is a check for z-value before getting the point and if no z-value it is
 sent to 2D-calculation instead. From my understanding the result should be
 the same as if getPoint3dz_p sets z-value to 0.0 on all points in the
 geometry.

 3. About the index, I think bitner have to be right that the 2Dindex will
 do no harm but just be less effective. Should I add that or is there some
 other ideas.

 /Nickla

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/576#comment:5>
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-devel mailing list