[postgis-devel] Distance operator in presence of M

Håvard Tveite havard.tveite at nmbu.no
Fri Jun 5 17:32:22 PDT 2015


On 05. juni 2015 15:51, Sandro Santilli wrote:
> On Fri, Jun 05, 2015 at 09:17:12AM +0200, Havard Tveite wrote:
>
>> For operations involving distance calculations, you need to have
>> a way to compare space+time "distances".  Which is closest of two
>> points where the spatial distances are 200m and 250m while the
>> temporal distances are 80 seconds and 60 seconds?
>> As Greg says, for that you need to have a velocity.
>> If velocity is supplied as a parameter, it could be possible to
>> support such operations.
>
> Indeed my work on space+time is currently based on "trajectories"
> which encode not only velocity but also direction (needed as well).

Velocity can be derived from the trajectory (represented as
a sequence of space-time positions), but when the sampling
frequency for the trajectory is too low to capture the
real world trajectory accurately, I would guess that the
user would want to be able to specify a velocity (could be
the users guess on the typical velocity or the maximum
velocity for that type of object) that is to be used in
distance calculations.

And space-time data do not have to be trajectory data.

To be able to do distance calculations on data with M
values, we need to be able to transform the M value into
a "compatible" dimension (resulting in a Euclidean space).
When M is time, this transform could be based on a
user-specified velocity (d=v*t).  In general, a
user-specified function (as suggested by Greg) that does
this transformation would be useful.  Or perhaps some
pre-defined functions with user-specified parameters
could work (d=a*M).

But this is probably too ambitious / complicated...

Håvard



More information about the postgis-devel mailing list