python-mapnik icon indicating copy to clipboard operation
python-mapnik copied to clipboard

getting blank image in output

Open pdpsinghr opened this issue 1 year ago • 0 comments

import mapnik m = mapnik.Map(1024, 768, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs') mapnik_xml_path = '/usr/share/renderd/example-map/xml/2024_05_20_07_amd.xml' m.srs = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' mapnik.load_map(m, mapnik_xml_path) bbox = mapnik.Box2d(-122.4,37.8, -122.3, 37.9) m.zoom_to_box(bbox) img = mapnik.Image(1024, 768) mapnik.render(m, img) img.save('output_image.png')

this is my python code but in response i am getting blank image

pdpsinghr avatar May 21 '24 13:05 pdpsinghr