[PATCH v1] Add defer relation support to PBF reading

Adds the missing support for deferred relations when working with PBF files. WanMil

On Sat, Oct 22, 2011 at 09:20:00PM +0200, WanMil wrote:
Adds the missing support for deferred relations when working with PBF files.
Thanks WanMil, but unfortunately this simple patch does not seem to be doing the trick for me. I tested with the ferry relation 155054: the highway=bus_stop members of the subrelations do not get the relation name (Suomenlinnan lautta) appended to their names. Marko

On Sat, Oct 22, 2011 at 09:20:00PM +0200, WanMil wrote:
Adds the missing support for deferred relations when working with PBF files.
Thanks WanMil, but unfortunately this simple patch does not seem to be doing the trick for me. I tested with the ferry relation 155054: the highway=bus_stop members of the subrelations do not get the relation name (Suomenlinnan lautta) appended to their names.
Marko
Hi Marko, the problem seems to be not the patch but either splitter or PBF dump utils. I downloaded the finland.osm.pbf extract from geofabrik, run splitter and used mkgmap with the patch. As you described the patch did nothing. I reconverted the tile containing the relation 155054 to osm XML using osmconvert. In the resulting file no relation contained a member with type="relation". Only members with type="node" or type="way" are contained. So there are three possible problems: 1. The geofabrik dump does not contain subrelations 2. Splitter does not support subrelations 3. Osmconvert does not support subrelations My current favourite is that splitter is the problem. Maybe someone who knows splitter better than me can have a look at it? Thanks! WanMil

Hello,
I downloaded the finland.osm.pbf extract from geofabrik, run splitter and used mkgmap with the patch. As you described the patch did nothing. I reconverted the tile containing the relation 155054 to osm XML using osmconvert. In the resulting file no relation contained a member with type="relation". Only members with type="node" or type="way" are contained.
So there are three possible problems: 1. The geofabrik dump does not contain subrelations 2. Splitter does not support subrelations 3. Osmconvert does not support subrelations
My current favourite is that splitter is the problem. Maybe someone who knows splitter better than me can have a look at it? Thanks!
It's 2.) Splitter. Relations that only contain relations are dropped. I thought this was known and someone will work on it in the future. You can test all three cases by filtering out the critical relations with osmfilter With best regards Hasemann

Hello,
I downloaded the finland.osm.pbf extract from geofabrik, run splitter and used mkgmap with the patch. As you described the patch did nothing. I reconverted the tile containing the relation 155054 to osm XML using osmconvert. In the resulting file no relation contained a member with type="relation". Only members with type="node" or type="way" are contained.
So there are three possible problems: 1. The geofabrik dump does not contain subrelations 2. Splitter does not support subrelations 3. Osmconvert does not support subrelations
My current favourite is that splitter is the problem. Maybe someone who knows splitter better than me can have a look at it? Thanks!
It's 2.) Splitter. Relations that only contain relations are dropped. I thought this was known and someone will work on it in the future.
You can test all three cases by filtering out the critical relations with osmfilter
With best regards
Hasemann
Thanks for the analysis. The fix in splitter seems to be very easy. Attached patch does the magic. WanMil

On Mon, Oct 24, 2011 at 06:50:49PM +0200, WanMil wrote:
Thanks for the analysis. The fix in splitter seems to be very easy. Attached patch does the magic.
Thanks, I can confirm this.
Will you now push the patches to splitter and mkgmap?
Marko
I cannot commit the change to splitter. Steve, can you push it? Thanks! WanMil
participants (4)
-
Marko Mäkelä
-
Olaf Hasemann
-
Steve Ratcliffe
-
WanMil