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

I'm building my own routing engine - which means I'm not using any of the routing frameworks for OSM.

So far I've built a graph with edges and vertices.

I'm parsing all the ways that are highways (I'm not taking areas).

My question is: how can turn a way into an edge (with one only two nodes, one defining the start and one defining the end) and remove all the ones in the middle? What approach has developers taken with this problem?

Thank you

asked 06 Feb '15, 15:23

echoalphapapa's gravatar image

accept rate: 0%

edited 06 Feb '15, 15:45

aseerel4c26's gravatar image

aseerel4c26 ♦

You could of course have a look at the existing routing engines which you don't want to use, each of which have solved that problem in one way or the other.

The question that you have been linked to in the post you reference above actually contains the answer. Re-read it: How can I convert an OSM XML file into a graph representation?

permanent link

answered 06 Feb '15, 15:46

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

edited 06 Feb '15, 15:48

I was looking for an explanation that's a bit more low level.

(06 Feb '15, 15:59) echoalphapapa

Can you be more specific? Which parts are unclear to you? Where are you stuck?

(06 Feb '15, 17:06) scai ♦

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 06 Feb '15, 15:23

question was seen: 4,594 times

last updated: 06 Feb '15, 17:06

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