tags:

views:

26

answers:

1

I've setup Mapnik to connect to a PostGIS database, and display geometry. I'd like to have a column in my database called opacity, and use it as the opacity for that row of geometry when Mapnik renders it.

So far, I've only found information on how to display text from the database, and how to use filters to display different styles when database values are within parameters. Nothing about how to use the values directly inside of a style or layer though - is this possible?

+2  A: 

Alex, this is not currently possible for opacity, but you can file a ticket at trac.mapnik.org to request it. Basically, in Mapnik trunk (aka Mapnik2), support has just been added to allow "data-driven symbolizers" for attributes beyond text, but opacity is not yet exposed:

http://mapnik.org/news/2009/dec/08/future_mapnik2/

Dane Springmeyer