I have a CSV file with data in GeoJSON format with 10k+ lines with various open / public data I want to use. So far it's in a file but later it may be in a SQLite database or even better be kept in RAM. This is to be used in a mobile app.
There are many columns in that file but what interests me are the geo shape column which is made of polylines (linestring with several points) and the column called "geo center"(it is has the center between start and end points of the polyline).
I want to know if a location (provided by the mobile device) is on any polylines defined in the file.
So my first thought is to filter all geo centers that are near enough to the given location, and then for each filtered polylines, check if the given location belongs the series of point couples.
Eg : location is L
Polyline 1 has 3 geo points X Y Z
My algorithm is (after filtering step) :
Is L on [X Y] ? If not is L on [Y Z] ? ...
Is it the most efficient way to tell if a point is on a polyline or is there any other way ?