systemed / tilemaker

Make OpenStreetMap vector tiles without the stack
https://tilemaker.org/
Other
1.5k stars 233 forks source link

Duplicate LineStrings for railways in default OpenMapTiles config ? #773

Open laem opened 3 weeks ago

laem commented 3 weeks ago

Hi, it looks to me like this line is the culprit that produces duplicate shapes for railways (train, tram, subway) in my output tiles.

https://github.com/systemed/tilemaker/blob/13b841d58f3f1bc1be6e4e7f86860e3eabfd91cf/resources/process-openmaptiles.lua#L557

Per the doc,

Layer(layer_name, is_area): write this node/way to the named layer. This is how you put objects in your vector tile. is_area (true/false) specifies whether a way should be treated as an area, or just as a linestring.

This way will be added twice, once with this Layer invocation, another time with the write_to_transportation_layer. The first one will be a LineString with no class that I highlighted in this capture as red thick lines.

image

When I inspect my tiles, this is what I get :

image

The top object in the popup is just an no-tag version of the objects below, I believe.

Can someone confirm that the issue is in the default process.lua ? I couldn't find another online .pmtiles file produced with the default process to compare.

I'm using a modified version of these settings in my project https://github.com/laem/gtfs/blob/master/tilemaker/resources/process-openmaptiles.lua.

systemed commented 3 weeks ago

Yes, I think you're right - it looks like that line has been erroneously left in after the code was refactored to include write_to_transportation_layer. If you delete that line it should fix it, I think.

laem commented 3 weeks ago

it looks like that line has been erroneously left in after the code was refactored to include write_to_transportation_layer

Yes, that was my guess. Looks fixed without any side effect. PR proposed