Artem, Thanks for the response! I was curious about an approach like using pyCairo to draw on the image. However, I wasn't clear on how to get the actual coordinate dimensions for the image such that I could transform my drawing operations onto the map. Is there a way to do this in Python after the map is rendered? Or is pyCairo using the coordinate system from the map?
As for the API, I'm still not sure about how far I'd need to go. Ideally I'd expose the full range of drawing operations that are provided by the renderer but that might be overkill. I'll probably start by just exposing a subset and see if that's any easier. Also, has there been any discussion about adding support for the new SQL/MM curve types? In case you're curious, here's an example of one of the maps I'm making. This was done with the PostGIS approach - it's still a work in progress but it did what I needed. http://www.structuralknowledge.com/maps/flow_map.png Thanks, Kevin On Thu, Jul 10, 2008 at 4:11 AM, Artem Pavlenko <[EMAIL PROTECTED]> wrote: > Hi Kevin, > > On 9 Jul 2008, at 18:01, Kevin Webb wrote: > >> Hi, >> >> I'm interested to know if anyone has developed an approach with Mapnik >> to draw layers manually (i.e. using graphics primitives directly) >> rather than going through the existing symbolizers. My interests is to >> take a map (via a shapefile, or postgis data source) and overlay >> structural, in my case non-cartographic/topological, data over top of >> it using the coordinate space from the map. I've devised a way to do >> this by inserting my markup into a postgis datasource and then >> rendering that as a layer. It works but is a bit clunky and doesn't >> allow for easy programmatic control of the drawing - it also makes >> certain kinds of drawing operations very challenging. In my case I am >> drawing arc segments between points with arrowhead caps. >> > > You can try using something like pycairo to draw on top of map. > >> Ideally the next step would be to expose a layer with graphics >> primitives through the API (in my case Python). I've looked at the >> source already and don't see anything heading in this direction, >> however, I'm curious if this is something that people have played >> with? I'm going to start hacking on the current 0.51 source to see >> investigate the feasibility of this change but would love any guidance >> that others may have. > > Yes, I can see this can be useful. What kind of API are you envisaging ? > >> Thanks, >> Kevin > > Cheers > Artem >> >> _______________________________________________ >> Mapnik-users mailing list >> [email protected] >> https://lists.berlios.de/mailman/listinfo/mapnik-users >> > > _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

