mapbox/tilemill — pull request #2384 by stevage (2014-08-01 05:27:43+00:00)
Title: Improve automatic layer names from SQL queries.

I added a few more rules to strip out other SQL keywords. Probably the smarter thing to do would be to have completely separate handling for SQL layers, and to look specifically for table and value names.

I added a rule to strip out osm2pgsql table names, because it seemed to work better in my testing. Instead of "planetosmlinehighwaypa" type names, you get "highwaypath". I would imagine that most people using osm data are going to have quite a few layers derived from the same few tables, and this way you get almost reasonable layer names by default.