[postgis-devel] distance calculations in dynamic number of dimensions

Nicklas Avén nicklas.aven at jordogskog.no
Fri Oct 15 10:39:47 PDT 2010


Hallo

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.

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. 
I don't know if that will be more difficult with polygons involved...


I don't know enough about the use of more than 3 dimensions, but I
imagine that it would open some new possibilities.

So, first question, would it be interesting to implement a
multidimensional functionality in the distance-calculations.
Is it worth the effort, will it attract new user groups in other fields?

The second question or discussion is how hard it would be.

What I think of as a possible approach is a multidimensional point that
handles it coordinates the same way a geometry handles it points. 

Maybe something like:


typedef struct
{
	/* array of coordinates like x y z .. .. .  */
	uchar *serialized_coordlist;
	
	int ndims;   /* how many dimensions (coordinates) */
	
	int maxdims; /* how many dims we have space for in
serialized_coordtlist */	
}
POINTMD; /* "Multidimensional point" */


Would it be difficult to open for some text representation like 

'POINT(15 54 5 87 56 8)'

Maybe it in that case should be a special name like

POINTMD instead of just POINT

Maybe there is some standard for this?

Is there more functions that could work on more than 3 dimensions?

Could it be interesting? Does any other GIS software have this
functionality?

Regards
Nicklas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20101015/eba8aa76/attachment.html>


More information about the postgis-devel mailing list