I've got the whole world divided into polygons (GEOJSON - FeatureCollection - MultiPolygon). Those polygons are FIRs (Flight Information Regions). Placed a LineString on the map I need to understand through which polygons it passes through. The LineString represents the flight plan of an aircraft.
I'm including a screenshot to better represent how it works:
I wonder what would be the best way to find all those polygons.
This is my FIR Feature Collection:
I've got multiple lines, so they are added as a GEOJSON MultiLineString, but in the end each one is a LineString.
So far the idea that I have is to use https://turfjs.org/docs/#along and call it every N amount of distance (e.g. 10 km) and call MapBox QueryRenderedFeatures (https://docs.mapbox.com/mapbox-gl-js/api/map/#map#queryrenderedfeatures) to get each feature, but I'm not sure if that's the best approach, I've got issues with that function and I'm not sure if it will work if some of the polygons are not in the screen view for long routes.
I would appreciate any help or indication, I tried to find more information on it, but I'm not sure if I'm searching for it correctly, it seems like something people have experienced in the past.