[OSM-dev] support for osm2pgsql with relation type=route

Martijn van Oosterhout kleptog at gmail.com
Sun Apr 13 18:10:52 BST 2008

On Sun, Apr 13, 2008 at 6:25 PM, Jon Burgess <jburgess777 at googlemail.com> wrote:
>  I recently enhanced the planet dump to copy the relations into another
>  file. I was hoping that we would be able to use this to avoid parsing
>  the file twice.

I saw that. We're you thinking of making another mode for that, or
were you thinking that it should activate whenever you do:

osm2pgsql -m relations.gz planet.gz

And it builds a list of ways need and remembers only those
automatically. That would leave us with only 50k ways to remember,
which seems managable.

>  Sounds good. I have not looked at your recent changes yet but I will do
>  soon. I've got a few more enhancements I'd like to make to get rid of
>  the 'polygon' flag. There are now several tags which can not be
>  classified as linear/polygon by just looking at the keys. I'm thinking
>  that we should put any closed way into both the line and polygon tables.

In the style file there's a possibility of indicating whether tags
apply to a linear or polygon feature. I hadn't considered the
possibility of them not being mutually exclusive, but from your
example it's clear we need to handle that. So, I'm thinking that we
allow any tag for ways to be marked with either "linear" or "polygon"
and if any "linear" tags are present it goes into the lines table,
similarly for "polygon" tags. So it will go into both if there's a
mixture of tags.

And if there's an area=yes tag, force it to the polygon table and
exclude it from the lines table.

Currently the style file just replicates the old behaviour but it'd be
nice if people started thinking about the kinds of thing that would be
nice to have.

Have a nice day,
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/

More information about the dev mailing list