- First, to achieve the change in size in the image and the map elements, I applied the scale factor directly in the constructors of image_32 and agg_renderer. For example, I multiplied the scale factor by the width and height of the image before setting these values. I also changed the values of the bboxes that are passed to CoordTransform and label_collision_detector in agg_renderer's constructor. There are maybe other better places than these to apply the scale factor. However, it is convenient to apply it before all these dimension values (image's width and height, label collision area, etc.) are used further.
- Agg_renderer holds a reference to a template type (T & pixmap) instead of a explicit reference to image_32. I assume there might be other image objects that could be used as well, but I haven't seen them in code yet. mapnik_python uses only the image_32 object in the render methods. If there are such other objects, I would have to make the changes I made in image_32 in all these classes.
I tried to reflect the changes in the python bindings. I added a third parameter to mapnik.Image's constructor and the code compiled correctly. However, townguide's code doesn't produce the images. I tried to disable the code that determines the resolution, but these values are used in other parts of the code that may be ...
No comments:
Post a Comment