<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.3">
</HEAD>
<BODY>
Hallo<BR>
<BR>
I have been doing some work on the 3D distance calculations. I now have working code for line-line calculations. There is some more work to take care of special cases.<BR>
<BR>
But, what struck me when searching for algorithms for this is that the calculations implemented so far  (point-point, point-line and line-line) quite easy could be written to handle any number of dimensions. <BR>
I don't know if that will be more difficult with polygons involved...<BR>
<BR>
<BR>
I don't know enough about the use of more than 3 dimensions, but I imagine that it would open some new possibilities.<BR>
<BR>
So, first question, would it be interesting to implement a multidimensional functionality in the distance-calculations.<BR>
Is it worth the effort, will it attract new user groups in other fields?<BR>
<BR>
The second question or discussion is how hard it would be.<BR>
<BR>
What I think of as a possible approach is a multidimensional point that handles it coordinates the same way a geometry handles it points. <BR>
<BR>
Maybe something like:<BR>
<BR>
<BR>
typedef struct<BR>
{<BR>
        /* array of coordinates like x y z .. .. .  */<BR>
        uchar *serialized_coordlist;<BR>
        <BR>
        int ndims;   /* how many dimensions (coordinates) */<BR>
        <BR>
        int maxdims; /* how many dims we have space for in serialized_coordtlist */     <BR>
}<BR>
POINTMD; /* "Multidimensional point" */<BR>
<BR>
<BR>
Would it be difficult to open for some text representation like <BR>
<BR>
'POINT(15 54 5 87 56 8)'<BR>
<BR>
Maybe it in that case should be a special name like<BR>
<BR>
POINTMD instead of just POINT<BR>
<BR>
Maybe there is some standard for this?<BR>
<BR>
Is there more functions that could work on more than 3 dimensions?<BR>
<BR>
Could it be interesting? Does any other GIS software have this functionality?<BR>
<BR>
Regards<BR>
Nicklas
</BODY>
</HTML>