Hello Community, I am having problems using Nik2Img. We want to produce high resolution geo-referenced PNGs, which works pretty well, until a certain Bounding Box size or "zoom level" is reached. Probably at resulting pngs bigger than 50 Megabytes. Output: D:\osm\mapnik\nik2img>D:\osm\mapnik\nik2img\nik2img.py D:\osm\mapnik\osm.xml D:\ Tiles\Mstb_2500.png --srs 21781 --bbox 8.15516 47.48854 8.30227 47.55949 --world -file wld --dimensions 17600 12800 Traceback (most recent call last): File "D:\osm\mapnik\nik2img\nik2img.py", line 238, in <module> main() File "D:\osm\mapnik\nik2img\nik2img.py", line 232, in main nik_map.open() File "D:\osm\mapnik\nik2img\mapnik_utils\composer.py", line 218, in open self.render() File "D:\osm\mapnik\nik2img\mapnik_utils\composer.py", line 327, in render renderer = super(ComposeDebug,self).render() File "D:\osm\mapnik\nik2img\mapnik_utils\composer.py", line 210, in render renderer.render_file() File "D:\osm\mapnik\nik2img\mapnik_utils\renderer.py", line 247, in render_fil e self.local_render_wrapper(self.m, self.image, self.format) File "D:\osm\mapnik\nik2img\mapnik_utils\renderer.py", line 131, in local_rend er_wrapper self.render_to_file(args) File "D:\osm\mapnik\nik2img\mapnik_utils\renderer.py", line 199, in render_to_ file mapnik.render_to_file(args) RuntimeError: bad allocation Any idea, how we can resolve this issue? We wanted to go this route instead of "generate_tiles.py" to later let our GIS-frontend tileseed the big rasters... Thx for any advice. asked 22 Apr '16, 14:05 do4sch |
we figured, that at about 12000x12000 pixels (depending on bounding box size) it throws this error. Anyone knows, if theres a "pixel-size-limit" with Nik2Img? We would need to create very large rasters to cover big scales...
This really looks like a software issue which is best raised on the relevant issue tracker.
You could try if nik4 gives you the same problems - nik4 can do everything nik2img can do but the invocation is a bit different. Having said that, generating giant GeoTIFFs and then splitting them in tiles seems like an unnecessary complication to me; being able to render small tiles is something that makes things easier, not harder...
Thank you Frederik for your hint to Nik4... I was able to render Tiles of big bounding boxes with Nik4 successfully, even in a "custom" projection. Why does altering the projection in the mapnik-xml has no influence? Do scripts like Nik2Img and Nik4 override the projection set in osm.xml?