NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

do4sch
26112
accept rate: 0%

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...

(22 Apr '16, 14:32) do4sch
1

This really looks like a software issue which is best raised on the relevant issue tracker.

(22 Apr '16, 16:01) SK53 ♦

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...

(23 Apr '16, 19:57) Frederik Ramm ♦

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?

(26 Apr '16, 09:02) do4sch

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×341
×2

question asked: 22 Apr '16, 14:05

question was seen: 1,462 times

last updated: 26 Apr '16, 16:54

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum