[postgis-devel] distance calculations in dynamic number of dimensions
Paragon Corporation
lr at pcorp.us
Sun Oct 17 18:13:41 PDT 2010
> 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?
Nicklas,
This is an interesting topic and one that I have entertained more than I
would like to admit. I probably don't know much more than you on the topic,
but
my sense is that its not of much interest unless the distance functions
return vectors instead of scalars, or have an additional function that takes
a formula (scalar product operation) that defines how the dimensions should
be collapsed to arrive at the scalar value.
Relevant reading --
http://en.wikipedia.org/wiki/Scalar_%28mathematics%29#Scalars_of_vector_spac
es
For example -- take the classic example that people try to use the 4
dimensions of space and time. Lets say we have X,Y,Z,time recorded in unix
epoch seconds.
If I were to ask you what is the distance between Nicklas of now and Nicklas
of 4 seconds ago. What would your answer be?
I think it depends. Even with our simplistic view of X,Y,Z our
transformation doesn't know how to deal with Z when its not in the same
units of X and Y.
I would say (the distance of X,Y,Z , 4 seconds). We have an idea of how to
collapse X,Y,Z but how do you collapse the 4 seconds into a single scalar
with the other coordinates to give it meaning?
So the only reasonable answer would be to return a vector (I think its
called a tensor in physics, but my physics is rusty :) ) - the vector has
the same dimensions of fewer than our input points and then the user can
define the transformation function that converts it to a scalar quantity.
Another example -- one not dealing with earthly space would be for example
in economics the supply , demand (you can even throw time in there). You
can think of supply and demand as different coordinates and there are
numerous theories on how they relate such that you could give some sort of
scalar distance given two different supply/demands. Though not sure how
interesting that would be.
> Could it be interesting? Does any other GIS software have this
functionality?
So short answer - could be but too much to tackle for 2.0. Other GIS
software -- hmm don't know of any -- my guess is you'd have to start looking
at matrix like tool kits like
R, S, SAS, Matlab, Mathematica to start getting into the realm you are
talking about. Even then, not quite sure they think about it quite the same
way.
> I don't know if that will be more difficult with polygons involved...
As far as polygons go -- that gets messy. As Paul pointed out once, its
hard to define what is a valid polygon even in 3D space and I have no idea
what a polygon means when adding on other dimensions.
Thanks,
Regina
More information about the postgis-devel
mailing list