artemp/mapnik — Issue #522: overflow/image corruption in octree with png256 + large pixel output
Author: artemp
Created: 2011-10-11 16:23:52+00:00
State: open
Labels: Core_Library

see the large image here:

http://dbsgeo.com/tmp/wms_image_corruption.png

fixed with advice from artem:

{{{
#!diff
Index: include/mapnik/octree.hpp
===================================================================
--- include/mapnik/octree.hpp (revision 1659)
+++ include/mapnik/octree.hpp (working copy)
@@ -86,11 +86,11 @@

bool is_leaf() const { return count == 0; }
node * children_[8];
- unsigned reds;
- unsigned greens;
- unsigned blues;
- unsigned count;
- unsigned count2;
+ boost::uint64_t reds;
+ boost::uint64_t greens;
+ boost::uint64_t blues;
+ boost::uint64_t count;
+ boost::uint64_t count2;
byte children_count;
byte index;
};

}}}

Although with this patch white background + png256 output (image/png8 mime) turns same color as processed_p.shp

compare:

normal png:

http://tile2.dbsgeo.com/?layers=__all__&bbox=18.497972,-72.479639,18.572645,-72.247381&service=WMS&request=GetMap&version=1.3.0&srs=EPSG:4326&format=image/png&styles=&crs=EPSG:4326&height=10000&width=12000

to:

png256/above patch:

http://tile2.dbsgeo.com/?layers=__all__&bbox=18.497972,-72.479639,18.572645,-72.247381&service=WMS&request=GetMap&version=1.3.0&srs=EPSG:4326&format=image/png8&styles=&crs=EPSG:4326&height=10000&width=12000