Geospatial – News

Mapserver High Resolution Output

16 März 2009

During the recent Toronto Code Sprint[1] there was a very interesting topic concerning the use of MapServer to generate high resolution maps suitable for printing, the results of which will be integrating into the future-coming 6.0 version.

Whereas the current version excels at rendering rather sophisticated maps for web/screen usage, folks wanting high resolution outputs usually had to resort to writing and maintaining two different mapfiles, as the program lacks the ability to automatically create an output suitable for paper printing:

  • if you want to stick to a raster output, you can request a very large image to get a high resolution, but the symbology isn’t scaled appropriately which means you end up with much smaller symbols than what you expected (lines are thinner, label text is tiny, etc…)
  • the vector outputs (namely pdf and svg) have suffered from a lack of love from the dev team, making them lag behind functionality-wise. They also somewhat suffer from high resolution requests as soon a raster layer must be incorporated.

To address these issues, the sprint was the occasion to follow up on some recent discussion in the mapserver development list[2], and formalize on RFC55[3] due in with the release of version 6.0. This will basically allow you to tell that your mapfile was written for a given resolution, and then have MapServer automagically scale all your symbology if your request says that the target resolution is different from the default one.

Those who would like to stick to vector output haven’t been forgotten either, with plans to integrate the cairo [4] library as a replacement rendering backend for pdf and svg output. Along with the rewrite of the entire rendering backend architecture, this will hopefully allow better maintainance in the long run between individual renderers, and allow us to drop the need for pdflib, whose licensing was very different to that of the rest of the codebase.

On the pdf side, there was also a lengthy discussion on page layout, as the aim of a pdf document is usually to present a map along with other information (be it a title, explaining text, copyright notice, disclaimer, logo, etc…). What we hope to achieve on this front will be to allow the user to specify a pre-existing (or programmatically pre-created) pdf template, and tell mapserver it should render its map at a specific position inside the document. For people with simpler needs, it will also be possible to only have to specify a page size and some margins, to have MapServer create a pdf page with only a map contained.

All in all, we hope the 6.0 release will be a nice step forward towards the creation of high quality maps.

Thomas Bonfort, Senior Developper (MapServer)

[1] http://wiki.osgeo.org/wiki/Toronto_Code_Sprint_2009
[2]
[3] http://www.mapserver.org/development/rfc/ms-rfc-55.html
[4] http://cairographics.org/

Hinterlassen Sie einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.