i have a linestring which is show in diagram and i have a point which is some time on the linestring or out of linestring but in range which is red line and some time its is out of range so how can i find when its on route and out of route in mysql spatial index
MY project is this as you can see bus no 26 is out off route so how can i get the bus is out off route
i think there is two things to do this
- convert linestring into a polygon with range and find point in a polygon.
- Point convert into polygon and check linestring is intersect the polygon.
so tell how can i do that
my database structure is
'id', 'int(11)', 'NO', 'PRI', NULL, 'auto_increment' 'route_name', 'varchar(45)', 'YES', '', NULL, '' 'from_id', 'varchar(45)', 'YES', '', NULL, '' 'to_id', 'varchar(45)', 'YES', '', NULL, '' 'line_string', 'geometry', 'NO', 'MUL', NULL, ''