[postgis-devel] Polyhedral, 3d and distance

Nicklas Avén nicklas.aven at jordogskog.no
Mon Aug 9 11:13:15 PDT 2010


Hallo

This polyhedral thing is really interesting. I have been thinking about the distance-functions against 3D. The word polyhedral is new to me and I don't know more about it than what Olivier has written in his post.

I have a few questions:

Olivier, in your post in January
http://postgis.refractions.net/pipermail/postgis-devel/2010-January/008384.html
you say that :

resulting PolyhedralSurface must be convex (and without hole)
        
is that a logical limitation or a limitation in the standard. 
I mean if the resulting geometry has to be convex it will be hard to describe things like the land shape, a mountain a valley etc.

                
as described in the post above:
every polygon mean a face (with all points on the same plan...

As I understand it (I like to add that so it hurts a little less when I'm wrong), a plane can be defined
by 3 points. But what when we have 4 or more points. There are several situations where that is no problem, but
if all 4 corners have unique coordinates both x, y and z then I suspect we can get floating point problems.
I guess we will have to find a way to deal with inaccurancy.

>From my understanding it can be compared to saying all points have to be exactly on the line. It is ok if it is two points, then it is no problem and it is ok 
if the points have two constant coordinates like 'LINESTRING( 1 1 1, 1 1 3, 1 1 10, 1 1 12)' but if the line represents a slope there might be problems.

This has to be something fundamental when calculating distances against polyhedrals. I don't know the algoritms, 
but from some reading I think the way to do it, for example the distance between a point and a polyhedral is to
"project the point to the plane"
check if the point is in the polygon on the plane
if so, the distance is between the projected point and the original point.
If not we have to do a distance calculation against the edges of the polygon. Like today, but in 3D.

The point is that the central part of this is the plane. How to handle that if the points are not exactly on the same plane.



Does this have an obvious solution that I'm missing or is it problems we will have to deal with?

The same problem will occur with a "normal" polygon that is tilted. 

I see this as a little similar problem as the inability to get an intersection between a point and a linestring.

How to handle the inaccuracy?

I might be totally lost in this.

Another difference between calculating distance in 2D and 3D I have realized is that two linestring can have their closest parts on the edges of both. Not like 2D where at least one of the geometries must be closest with a vertex.
That is just an observation.

Thanks
Nicklas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20100809/229ebb83/attachment.html>


More information about the postgis-devel mailing list