Sorry I did not include the errors that I have been getting, but here they
are:
>>> from mapnik import *
>>> m= Map(800,600, "+proj=latlong +ellps= WGS84")
>>> m.background = Color('white')
>>> hydropoints_lyr= Layer('Hydrobrakes')
>>> hydropoints_lyr.datasource =
Shapefile(file='E:/Hydrobrakes/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'))
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
hydropoints_rule_on.symbols.append(PointSymbolizer(file
='E:/Hydrobrakes/hydrobrakes.png',type ='png',width= '2', height= '2'))
ArgumentError: Python argument types in
PointSymbolizer.__init__(PointSymbolizer)
did not match C++ signature:
__init__(struct _object *, class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >, class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >, unsigned int, unsigned int)
__init__(struct _object *)
>>>
Thanks again for the reply and the help.
Joe
On Wed, Sep 17, 2008 at 5:41 AM, Martijn van Oosterhout
<[EMAIL PROTECTED]>wrote:
> It would help if you told us what the actual error was...
>
> On Tue, Sep 16, 2008 at 10:19 PM, Joseph Jira <[EMAIL PROTECTED]> wrote:
> > 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
> >
> >
>
>
>
> --
> Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/
>
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users