I have such problem and I would be nice If somebody can help me. I have points table with GIST index. Those points don't change in time.
I would like to fetch points that are near some given linestring. Example: Imagine that linestring is the road and points are poi along the road. I would like to fetch poi's that are in 5 km distance from the given road. I would like to fetch those pois in correct order (driving order along the road). Look at the image:
For given road from point 1 to 5 i would like to fetch POIs that is in 5 km max from the road and in order from point 1 to 5 along the road. So the result should be:
POI_ID
1
5
6
8
9
10
12
13
This should tell me what POI I can visit during traveling along the road with minimum cost.
Does anybody have some ideas how to do it with postgres and postgis?