5

Here's what I'm trying to do:

  • I'm modeling some transportation logistics data
  • I want to test the effects of a "new highway" on existing travel demand
  • The new road will be created from an arbitrary point (usually not on the existing roadway) to any point on the road network (road line layer)
  • The new road should acquire the same fields / attributes as the road it connected too

Is this possible with OSM data?

4
  • how are you storing your data?
    – Ian Turton
    Commented Sep 23, 2010 at 14:05
  • Postgres/postgis
    – dassouki
    Commented Sep 23, 2010 at 16:10
  • When you say 'test the effects', are you planning to run a computer simulation including the 'new highway' or what's your idea?
    – underdark
    Commented Oct 23, 2010 at 17:47
  • @underdark: the idea is to model traffic patterns using a computer simulation based on my python code on the old and new network. i.e. with and without the extra or removed portions of highway
    – dassouki
    Commented Oct 23, 2010 at 19:04

3 Answers 3

2

I would take a look at JOSM too (see the link Mapperz provided for the comparison to Merkaator). If the core application doesn't do what you need out-of-the-box, there might be a plug-in that will work--or you can develop your own.

1

Offline OSM editor http://merkaartor.be/

you can use it for your experimental 'highways'

Support for handling separated highways

you can compare it with other editors

http://wiki.openstreetmap.org/wiki/Comparison_of_editors#Merkaartor

1
  • how about program-atically?
    – dassouki
    Commented Sep 23, 2010 at 11:37
1

There is no way to do this with some kind of standard library, but if you want to do this in your own code you can do this:

  1. Find the nodes where it should connect and insert them into that way. (e.g. node#1234 and node#4321)
  2. from the placement of those nodes generate a motorway of the correct length in your program
  3. connect the nodes like this, and add it to the osm file.
<way id=fakeid>
<nd ref="node#1234">
<nd ref="fake node id">
<nd ref="node#4321">
</way>
<node id="fake node id" lat="generate the right length" lon=""/>

But I would probably use JOSM as suggested above like this:

  1. download the whole area you want to simulate.
  2. load that into one postgis DB with osm2pgsql.
  3. start JOSM and draw a line that is roughly the length of the motorway you need, connecting where you want it
  4. load the changed .osm into another DB
  5. do you analysis.

Are you sure your program works with Postgis, would be cool to know more. Seems more like you want to develop something like a router, and handling the graphs on your own. e.g. Gosmore could give you time estimations from different points etc..

PS to generate fake ids you can use negative ids, that will work with osm2pgsql.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.