systemed / tilemaker

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

How to avoid duplicate processing of OSM object #730

Open caerandir opened 4 months ago

caerandir commented 4 months ago

First of all: Thanks for providing tilemaker! Very cool piece of software!

Is there a way to avoid that the same OSM object is processed twice because it matches more than one condition in node_keys and/or way_keys?

Here's an example - imagine node_keys = {"building", "amenity", "tourism=attraction", "man_made"}. Now there's an observation tower with a shop that sells ice cream, which in OSM has the keys man_made=tower, tourism=attraction, building=yes and amenity=ice_cream. It will now turn up four times for processing in node_function(), and I currently try to counter this by checking for such combinations, but I am wondering if there's a more elegant way. If not, I'd propose something where you could - like with the Id()-function that returns the OSM ID - have Id_processed() or Processed(Id()) which returns true or false if the object was already processed or added to a layer.