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

I am using this querry to extract road network used by cars: osmosis --read-xml niedersachsen.osm --tf accept-ways highway=* --tf reject-ways highway=pedestrian,footway,steps,cycleway,bridleway --tf reject-relations --used-node --write-xml niedersachsen_roadnetwork.osm

But still I need to find the start and end coordinates of the street and street name. Any suggestions? Maybe there is some other more efficient way.

This question is marked "community wiki".

asked 26 Mar '13, 12:00

tfarooqi's gravatar image

accept rate: 0%

edited 26 Mar '13, 12:06

Do you have programming experience?

(26 Mar '13, 14:53) gormo

Yes, I have basic knowlwdge of Python, c++

(26 Mar '13, 14:57) tfarooqi

Maybe if you read the source code of you would find some hints and pointers --- or maybe this is what you want anyway?

(26 Mar '13, 15:14) gormo

What kind of analysis you plan on doing on the data? This will be the determinant of the data structure you have to read your data into.

Also, be aware that one street may be mapped as multiple connecting ways, and similar street names may occur in different cities.

I don't know if the first node appearing inside

<way id="126879680" user="KartoGrapHiti" uid="57645" visible="true" version="1" changeset="9072314" timestamp="2011-08-20T09:01:54Z">
<nd ref="1405376824"/>
<nd ref="1405376826"/>
<nd ref="1405376827"/>
<nd ref="1405376829"/>
<nd ref="1405376832"/>
<tag k="highway" v="service"/>
<tag k="oneway" v="yes"/>

is actually the start of the way, for whatever constitutes the start of a street for you.

permanent link

answered 26 Mar '13, 14:52

gormo's gravatar image

accept rate: 13%

edited 26 Mar '13, 16:57

I have a database of geo position, and I want to map these coordinates to the nodes(coordinates) of the link/route/street present in the map. For this I have to identify the link, which I think can be done if I find the start and end coordinates of the link/route/street

(26 Mar '13, 15:01) tfarooqi

Just for clarification: you don't want to take the actual course of the street into account, just a line-of-sight-connection between the start and end node of the street? So, for a street shaped like a "C", you would get a line that does not resemble the actual street in any way?

Your question is more of a general GIS question and not one specific to OSM. I would suggest you asked it at .

(26 Mar '13, 15:10) gormo

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: 26 Mar '13, 12:00

question was seen: 7,192 times

last updated: 26 Mar '13, 16:57

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