[postgis-users] Querying for pairwise close approaches for a set of trajectories.

Tumasgiu Rossini rossini.t at gmail.com
Fri Feb 15 04:01:08 PST 2019


Not sure, but by subdividing your trajectories,
maybe you could index  theirs geometries and their time interval
to avoid some unneeded calculations ?

Le ven. 15 févr. 2019 à 07:14, Stefan Novak <
slnovak+subscriptions at fastmail.fm> a écrit :

> Hello!
> I'm interested in using PostGIS's support for trajectories to solve a
> problem I'm working on. I have a collection of 3D spatiotemporal
> trajectories (representing spacecraft orbits) that I'm needing to query for
> any close approaches among any pair of trajectories.  For my problem, a
> close approach occurs when the distance between two trajectories at the
> same time/measure falls below a threshold; a close approach can occur
> multiple times between a pair of trajectories. Naively, the problem can be
> solved by calculating pairwise distances for each epoch, resulting in ~
> n^2/2*t distance calculations (where t is the number of timesteps), but I'm
> trying to avoid the n-squared problem.
> I started reading through the docs and was attracted to
> ST_ClosestPointOfApproach, however I'm interested in more than just the
> point of minimum distance between the trajectories -- it would be ideal to
> have multiple closest points of approach.
> Is it possible to use PostGIS to perform this type of query?
> On a related note, is it possible to index trajectory geometries such that
> a Cartesian product can be avoided when querying for close approaches
> between any pairs of trajectories?
> Thanks for any insight you can share!
> Cheers!
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190215/9ed0172d/attachment.html>

More information about the postgis-users mailing list