Open
Description
The usage of the tiles option (e.g. --tiles 2) leads to rendering artefacts.
If the aim is to create one large image (e.g. 25000x25000 pixels) the tiles option isn't necessary at all. mapnik has (as far as I know) no size limit. It seems that the problem comes in with the resize function (which seems to be limited [16384?]):
...
# for layer processing we need to create the Map object
m = mapnik.Map(100, 100) # temporary size, will be changed before output
mapnik.load_map_from_string(m, style_xml.encode("utf-8"), False, style_path)
m.srs = proj_target.params()
...
# export image
m.aspect_fix_mode = mapnik.aspect_fix_mode.GROW_BBOX
m.resize(size[0], size[1])
m.zoom_to_box(bbox)
A possible solution to avoid the rendering artefacts (if the aim is to create one large image) is to avoid tiling and resizing.
...
# for layer processing we need to create the Map object
m = mapnik.Map(size[0], size[1])
mapnik.load_map_from_string(m, style_xml.encode("utf-8"), False, style_path)
m.srs = proj_target.params()
...
# export image
m.aspect_fix_mode = mapnik.aspect_fix_mode.GROW_BBOX
m.zoom_to_box(bbox)
...
Metadata
Metadata
Assignees
Labels
No labels