NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum

I've been working with streets in cities by collecting ways and their nodes from OpenStreetMap. Sometimes the nodes for a street are good, like this example. Sometimes the street could have a better collection of nodes, like this example which could use a couple more nodes in the middle ... or this example which could use a whole lot of nodes added to it.

Ideally, I'd like to work with the nodes in my own site & push my changes back to OpenStreetMap. Is that possible? Then, if it's possible, is it recommended? I know that 'import' type changes are not very welcome (or at least approached with extreme caution), and I'm not sure if these types of changes would fall under that category.

The simplest form of this contribution could be a situation where I add more nodes to a street, and then push those nodes back to OpenStreetMap. I'm looking to find out if there's a more automated way of accomplishing this beyond adding the nodes to my site, and then also manually adding the nodes into OpenStreetMap via iD.

asked 03 May '14, 22:49

JamesChevalier's gravatar image

accept rate: 25%

Assuming for a moment that you never make changes to your site that are unsuitable for OSM - then could you not simply build it so that your site retrieves near-immediate updates from OpenStreetMap, and then only make the improvements on OSM (rather than making improvements on your site and then building complex ways to share them back)?

OSM does have an editing API which allows you to upload new or modified versions of objects (in your case, each way improvement would probably mean a few nodes changed, a few created, and a way changed) so you could theoretically build something that contributes your changes back to OSM. Libraries for accessing the OSM API exist for a few programming languages (see the wiki) but actually coding stuff yourself is not terribly difficult. However, the more time elapses between loading an OSM object into your system and then uploading an improved version, the greater the danger of a "version conflict" which occurs if someone else has modified the object in the mean time; and resolving these conflicts - keeping their improvement while also uploading yours - is difficult to do in an automated fashion.

permanent link

answered 03 May '14, 23:40

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

edited 03 May '14, 23:47

That's a good point, about the time between getting info into my site & back out again. Right now, I do very large infrequent imports into my site: one-offs, where I get an entire country's worth of cities (and their streets). So that time would be very large.

(03 May '14, 23:45) JamesChevalier

I don't think this wouldn't be possible "in principle", in the end all offline editors do something similar.

However you would need to have reasonably current data on your side or you likely would have endless conflicts, and further you need to implement all the logic that is necessary to correctly modify and add OSM data, for example relation handling, direction dependent tags and so on and so on.

Not a difficult task, just one that takes a significant amount of time and effort.

If you do try to implement your idea, please test against either a private instance of the rails port or one of the dev instances that we offer.

permanent link

answered 03 May '14, 23:41

SimonPoole's gravatar image

SimonPoole ♦
accept rate: 18%

Your answer
toggle preview

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: 03 May '14, 22:49

question was seen: 3,556 times

last updated: 03 May '14, 23:47

NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum