Thanks in advance...
I'm new to Python and to programming in general, but I have a
GIS/Cartography background. I'm working on a sewer map with sewer structures
(manholes) being symbolized using the PointSymbolizer.
Here is my code...
from mapnik export *
m= Map(800,600, "+proj=latlong +ellps= WGS84")
m.background = Color('white')
hydropoints_lyr= Layer('Hydrobrakes')
hydropoints_lyr.datasource = Shapefile(file='E:/Hydrobrakes',
encoding='latin1')
hydropoints_style = Style()
hydropoints_rule_on = Rule()
hydropoints_rule_on.filter = Filter("[STATUS] = 'ACT'")
hydropoints_rule_on.symbols.append(PointSymbolizer(file
='E:/Hydrobrakes/hydrobrakes.png',type ="png",width= "2", height= "2"))
m.append_style('hydrobrakesstyle',hydropoints_style)
hydropoints_lyr.styles.append('hydrobrakesstyle')
m.layers.append(hydropoints_layer)
m.zoom_to_box(lyr.envelope())
render_to_file(m,'hydrobrakes.png', 'png')
The colored text is where I seem to get an error...
Any help, or example code would be really appreciated.
Joe
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users