开发者

Using data from a dataset in styles with Mapnik

开发者 https://www.devze.com 2022-12-30 03:42 出处:网络
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 rend

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?


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/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号