I'm having trouble whether which approach to take in simplifying a graph from another graph. It's not a basic graph difference but the other way around.
I want to further simplify a graph of a street network Graph (G) by only getting the nodes and edges where a geojson linestring passes by. I want my final output to be of course a graph.
Is it a correct approach for geojson linestring to:
1.) Turn geojson (linestring) into Shapely geometry object,
2.) Project it to a GeoDataFrame
3.) >>> ???
or is it possible and should I turn a graph into a shapely object? Not all geojson linestring passes exactly on the street network, so I was thinking that I should be able to compute that a linestring is near the original Graph (G) and take Graph(G)'s nodes and edges of the filtered (where the linestring passes by) rill be retained.