I have a file in GeoJSON format with 10k+ lines so far but it will grow to 1M+ lines later. I am interested in the geo shape column which is made of polylines (linestring with several points). The column called "geo center" is also interesting since it is has the center between start and end points of the polyline.

I want to know if a given location 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 ?