{"id":362,"date":"2009-02-12T11:43:50","date_gmt":"2009-02-12T16:43:50","guid":{"rendered":"http:\/\/crschmidt.net\/blog\/?p=362"},"modified":"2009-02-12T11:43:50","modified_gmt":"2009-02-12T16:43:50","slug":"making-a-big-osm-map","status":"publish","type":"post","link":"https:\/\/crschmidt.net\/blog\/archives\/362\/making-a-big-osm-map\/","title":{"rendered":"Making a Big OSM Map"},"content":{"rendered":"<p>Mapnik is a great tool. It allows for all kinds of neat toys to happen, and the recent work in SVN has really opened up the possibility that Mapnik might be a potential solution for a rendering engine in a lot of areas that it has previously left alone. (Support for reading OGR datasources, sqlite\/spatiallite plugins, etc. are all great developments that look likely to be released in the upcoming 0.6 release.)<\/p>\n<p><a href=\"http:\/\/www.flickr.com\/photos\/crschmidt\/3274048625\/\" title=\"Big OSM Map by crschmidt, on Flickr\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/farm4.static.flickr.com\/3369\/3274048625_815c60625e_m.jpg\" width=\"240\" height=\"180\" alt=\"Big OSM Map\" style=\"float:right; margin: 0px 0px 10px 10px\" \/><\/a> In prep for the <a href=\"http:\/\/wiki.openstreetmap.org\/wiki\/Boston#Mapping_Party\">OpenStreetMap Mapping Party<\/a> this Saturday and Sunday in Somerville, I was working on printing a big map to bring with me. A friend at the Media Lab was gracious enough to help me out.<\/p>\n<p>Using Mapnik, it was trivial to produce a large &#8212; 29750 x 29750 pixel &#8212; PNG image. This was designed to fill up the 49.5&#8243; by 49.5&#8243; printer space at 600 dpi.<\/p>\n<p>The printer prefers PDF, PS or TIFF. I was able to take that PNG and convert it to a TIFF &#8212; but the resulting tiff was DEFLATE compressed, and the printer help only mentioned LZW compression. I decided to fall back to trusty GDAL to try to fix this. I found that the imagemagick-converted TIFF had one giant block &#8212; and GDAL was not pleased with this at all. (Its internal un-blocking scheme doesn&#8217;t work with compressed tiffs.)<\/p>\n<p>Thanks to a suggestion from Norman Vine, I was able to use the ossim image copy program (icp) to convert this giant tiff to a tiled tiff which gdal could easily read: <tt>icp tiff_tiled -w 256 image2.out.tiff image.icp.tiff<\/tt>. Once I had done this, I recompressed the tiff using LZW compression with GDAL: <tt>gdal_translate -co COMPRESS=LZW image.icp.tiff image.lzw.tiff<\/tt>, and was able to upload the 3GB image to the printer.<\/p>\n<p>All in all, took a bit more than I was expecting, but I&#8217;ve got a 4ft by 4ft map to bring to the mapping party this weekend. In the process, I also got to wanting <a href=\"http:\/\/trac.mapnik.org\/ticket\/190#comment:3\">magnification<\/a> in Mapnik&#8230; which is amusing since just 24 hours before, I&#8217;d read a thread on the MapServer list and couldn&#8217;t imagine for the life of me why such a thing mattered.<\/p>\n<p>Looking forward to showing the map off to local OSMers at the mapping party!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mapnik is a great tool. It allows for all kinds of neat toys to happen, and the recent work in SVN has really opened up the possibility that Mapnik might be a potential solution for a rendering engine in a lot of areas that it has previously left alone. (Support for reading OGR datasources, sqlite\/spatiallite [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-362","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/comments?post=362"}],"version-history":[{"count":0,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/362\/revisions"}],"wp:attachment":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/categories?post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/tags?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}