NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Thank you team! Your response has always been useful for me. Please still on my ongoing project. I have successfully written a code to retrieve intersections along a given street. But the stage I am now is identifying points of interest e.g restaurant, along the street. For example, let's say in a particular area A, we have street X and Street Y. My aim is to identify all the restaurants in Street X and arrange them in order that they are in real life. So when a user is moving from point P1 to point P2 on street X, I want the user to know if he has reached a restaurant, or an intersection as he progresses on the journey towards P2. How do i get this done? I can extract intersections separately and i can also extract restaurants separately, but I do not know how to merge them and arrange them in the order that they are appear in reality on the map. Please I need your suggestions.

asked 14 Feb '22, 15:23

Segunlakata's gravatar image

Segunlakata
16131316
accept rate: 0%


You seem to be wanting something like a 1-D map. I wrote a blog post about one approach a few years ago, and very recently Robert Whittaker has implemented something rather similar. In both cases I suspect that we use PostGIS to do all the hard work because it needs a range of geospatial operations such as ST_ShortestLine. You may find some ideas in my post.

permanent link

answered 15 Feb '22, 15:36

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×92

question asked: 14 Feb '22, 15:23

question was seen: 880 times

last updated: 15 Feb '22, 15:36

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum