MySQL Geospatial Query

Job ID: 36091854

Budget: $10 – $30 USD

I need help writing a Geospatial Query in MySQL.

I have a table with GPS coordinates generated from tracking devices. These are linked to trips by a vehicle ID and start and end date. I then have another table which includes routes as Linestring geometries.

I need a query which for a given datetime range, will give me the following:
All the trips that followed the routes in the routes table (or part of the route) and the time spent on each route (time is saved with coordinates).

A single trip will follow multiple routes.
A single trip might include the same route multiple times.
Multiple trips for different vehicles could follow the same route.

I would also like to know which portion/s of a trip are not on a route.
Related categories: PHP MySQL Geospatial Database Programming