Hello, everybody. I 'm building a database of coordinates of public transport using geoJson type LineString.
In my search, I need to find documents near in, at least, one point of a given point.
For example: Given a database with many transport routes (many documents with geoJson objects type LineString), I need find that ones that passes near from my home (given point).
I’m using $geoNear aggregation for that and it’s working, but I’d like to have returned in includeLocs Field just that points in the LineString coordinates that are near from my home. Instead, I’m receiving all the coordinates in that document.
How could I filter only that ones near of my home?
Should I change to geoJson type ‘point’ and use many points to represent a line??
Thanks for collaboration.