[Tile-serving] [osm2pgsql] Make style.lua code nicer (#53)

Richard Fairhurst notifications at github.com
Fri Jul 19 13:59:34 UTC 2013


You should be able to cut out a bunch of the if statements this way.

Add before the function definitions:

```lua
polygon_tags = { 'building', 'landuse', 'amenity', 'harbour', 'historic', 'leisure', 
                 'man_made', 'military', 'natural', 'office', 'place', 'power',
                 'public_transport', 'shop', 'sport', 'tourism', 'waterway',
                 'wetland', 'water', 'aeroway' }
```

then replace the if statements in filter_tags_way with:

```lua
	for i,v in ipairs(polygon_tags) do
		if tags[v] then
			poly=1
			break
		end
	end
```

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/53
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20130719/c1cb7421/attachment.html>


More information about the Tile-serving mailing list