[OSM-dev] osm2pgsql gets route-relation support
Martijn van Oosterhout
kleptog at gmail.com
Sun May 18 09:31:32 BST 2008
After some prodding last night I finally got around to committing (a
variation of) the route relation code that gravitystorm used to get
the bicycle routes. I've committed it to SVN and hopefully didn't
break anything. A few notes:
- It really only works in --slim mode, because it needs to remember
all the roads that may be used. The gravitystorm code just remembered
everything which isn't feasable for the general case (the nodes
already take up gigabytes). On the other hand, --slim is slower,
especially if you don't have much memory but quite managable for
reasonable size areas.
- If you want to use it for bicycle stuff, you need to uncomment the
lines in the style file for the extra fields. For bus relations I
think all the existing fields are enough.
- In the future I may be able to get it to use non-slim mode, by
having it reread previously output ways from the lines table and
reparsing them. I think GEOS has a function for that so it might work.
It's not written yet though.
- In the future it may also be an idea to store routes in a table
other than lines/roads. Would like some feedback from people doing
renderers about this idea.
- Right now handling route relations is always enabled, but I may make
it configurable in the config file.
Testing/bug reports accepted.
Have a nice day,
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/
More information about the dev