Skip to main content
fix brain fart
Source Link
Grigory Rechistov
  • 14.4k
  • 2
  • 30
  • 61

From the programmer's viewpoint here is an algorithm I would implement if I was faced with this problem.

  1. Get an Openstreetmap database extract for the region I am interested in.
  2. Filter the extract file to keep only nodes/ways with tags amenity=restaurant, amenity=fast_food etc. That is, only data related to the "food" category.
  3. Write a script that takes a set of GPX points of the route, a set of the "restaurant" points, and a threshold distance value. For each POI, calculate the minimum distance to all points (or line segment, to linear segments) of the route.
  4. Finally, generate a GPX with only those "restaurant" POIs which are close enough (below the fixed threshold).

Alternatively, a database query for Overpass API could be constructed to do all this work. I am quite weak in its obscure language(s), but there are likely ready examples for it for finding POIs along a curve.

As such, this question is maybe more suitable for the GIS Q&A site.

From the programmer's viewpoint here is an algorithm I would implement if I was faced with this problem.

  1. Get an Openstreetmap database extract for the region I am interested in.
  2. Filter the extract file to keep only nodes/ways with tags amenity=restaurant, amenity=fast_food etc. That is, only data related to the "food" category.
  3. Write a script that takes a set of GPX points of the route, a set of the "restaurant" points, and a threshold distance value. For each POI, calculate the minimum distance to all points (or line segment, to ) of the route.
  4. Finally, generate a GPX with only those "restaurant" POIs which are close enough (below the fixed threshold).

Alternatively, a database query for Overpass API could be constructed to do all this work. I am quite weak in its obscure language(s), but there are likely ready examples for it for finding POIs along a curve.

As such, this question is maybe more suitable for the GIS Q&A site.

From the programmer's viewpoint here is an algorithm I would implement if I was faced with this problem.

  1. Get an Openstreetmap database extract for the region I am interested in.
  2. Filter the extract file to keep only nodes/ways with tags amenity=restaurant, amenity=fast_food etc. That is, only data related to the "food" category.
  3. Write a script that takes a set of GPX points of the route, a set of the "restaurant" points, and a threshold distance value. For each POI, calculate the minimum distance to all points (or linear segments) of the route.
  4. Finally, generate a GPX with only those "restaurant" POIs which are close enough (below the fixed threshold).

Alternatively, a database query for Overpass API could be constructed to do all this work. I am quite weak in its obscure language(s), but there are likely ready examples for it for finding POIs along a curve.

As such, this question is maybe more suitable for the GIS Q&A site.

Now I am sure
Source Link
Grigory Rechistov
  • 14.4k
  • 2
  • 30
  • 61

I am not sure if an existing solution exist, and whether a free solution exist. From the programmer's viewpoint here is an algorithm I would implement if I was faced with this problem.

  1. Get an Openstreetmap database extract for the region I am interested in.
  2. Filter the extract file to keep only nodes/ways with tags amenity=restaurant, amenity=fast_food etc. That is, only data related to the "food" category.
  3. Write a script that takes a set of GPX points of the route, a set of the "restaurant" points, and a threshold distance value. For each POI, calculate the minimum distance to all points (or line segment, to ) of the route.
  4. Finally, generate a GPX with only those "restaurant" POIs which are close enough (below the fixed threshold).

Alternatively, a database query for Overpass API could be constructed to do all this work. I am quite weak in its obscure language(s), but there are likely ready examples for it for finding POIs along a curve.

As such, this question is maybe more suitable for the GIS Q&A site.

I am not sure if an existing solution exist, and whether a free solution exist. From the programmer's viewpoint here is an algorithm I would implement if I was faced with this problem.

  1. Get an Openstreetmap database extract for the region I am interested in.
  2. Filter the extract file to keep only nodes/ways with tags amenity=restaurant, amenity=fast_food etc. That is, only data related to the "food" category.
  3. Write a script that takes a set of GPX points of the route, a set of the "restaurant" points, and a threshold distance value. For each POI, calculate the minimum distance to all points (or line segment, to ) of the route.
  4. Finally, generate a GPX with only those "restaurant" POIs which are close enough (below the fixed threshold).

Alternatively, a database query for Overpass API could be constructed to do all this work. I am quite weak in its obscure language(s), but there are likely ready examples for it for finding POIs along a curve.

As such, this question is maybe more suitable for the GIS Q&A site.

From the programmer's viewpoint here is an algorithm I would implement if I was faced with this problem.

  1. Get an Openstreetmap database extract for the region I am interested in.
  2. Filter the extract file to keep only nodes/ways with tags amenity=restaurant, amenity=fast_food etc. That is, only data related to the "food" category.
  3. Write a script that takes a set of GPX points of the route, a set of the "restaurant" points, and a threshold distance value. For each POI, calculate the minimum distance to all points (or line segment, to ) of the route.
  4. Finally, generate a GPX with only those "restaurant" POIs which are close enough (below the fixed threshold).

Alternatively, a database query for Overpass API could be constructed to do all this work. I am quite weak in its obscure language(s), but there are likely ready examples for it for finding POIs along a curve.

As such, this question is maybe more suitable for the GIS Q&A site.

Source Link
Grigory Rechistov
  • 14.4k
  • 2
  • 30
  • 61

I am not sure if an existing solution exist, and whether a free solution exist. From the programmer's viewpoint here is an algorithm I would implement if I was faced with this problem.

  1. Get an Openstreetmap database extract for the region I am interested in.
  2. Filter the extract file to keep only nodes/ways with tags amenity=restaurant, amenity=fast_food etc. That is, only data related to the "food" category.
  3. Write a script that takes a set of GPX points of the route, a set of the "restaurant" points, and a threshold distance value. For each POI, calculate the minimum distance to all points (or line segment, to ) of the route.
  4. Finally, generate a GPX with only those "restaurant" POIs which are close enough (below the fixed threshold).

Alternatively, a database query for Overpass API could be constructed to do all this work. I am quite weak in its obscure language(s), but there are likely ready examples for it for finding POIs along a curve.

As such, this question is maybe more suitable for the GIS Q&A site.