artemp/mapnik — Issue #871: extend attribute collector to provide tokens usable in datasource where clauses
Author: artemp
Created: 2011-10-11 16:39:47+00:00
State: open
Labels: Core_Library

postgis queries benefit from using where clauses like:

{{{
type in ('this','that','other')
}}}

To form these up manually is fine but takes time and is error prone (lots of manual checking between style and layer). It would be ideal if mapnik could help this be more automatic.

My best idea is that the attribute collector could provide the needed tokens and they could be passed to the mapnik::query so that ds plugins like postgis could populate some variable like !fields:type! dynamically during query construction.

Perhaps then a style sheet author could write: `where type in (!fields:type!)` and `!fields:type!` would evaluate to `'this','that','other'`.