[Mobilitydb-users] selected-link-analysis
SCHOEMANS Maxime
maxime.schoemans at ulb.be
Mon Sep 30 07:20:47 PDT 2024
Hi Jan,
On 30/09/2024 12:28, Jan Willem van der Lichte via Mobilitydb-users wrote:
> Just wondering, is there something like a selected-link-analysis in
the mobilitydb environment?
> Or suggestions what the best approach is to so.
There is no specific function for selected-link-analysis, but you can
combine multiple existing functions to achieve this.
> What is the origin from the people passing point X, and what is their
destination? And that for both directions?
Assuming your point X is a singular geometry and you have a table
'trips(id, trip, ...)', you can use a query such as:
SELECT id, startValue(trip), endValue(trip)
FROM trips
WHERE eintersects(trip, geometry 'POINT(...)');
This will return the id, start and end position of every trip that
passes through ('ever intersects') the specified point.
However, I'm not sure what you mean by 'both directions'.
Note that 'eintersects' ('ever intersects') will only return True if the
trip passes exactly through the specified geometry.
If your geometry is a point of interest near the road, you can use the
'edwithin' ('ever distance within') function instead.
Based on your specific needs, the query will probably need some
tweaking, but I hope this already helps.
Let us know if you have any additional questions regarding this.
Best regards,
Maxime Schoemans
More information about the Mobilitydb-users
mailing list