Smrender V2.0 available

Smrender is a powerful and flexible renderer to create paper charts. 🙂 With the latest release several cool improvements have been done. The following list gives a brief overview.

  • Conditional rendering.
  • Support for tile creation.
  • Bounding box may be used to specify area of rendering instead of center point.
  • Bugfix in polygon closing action cat_poly().
  • Auto-rotation completely rewritten and improved.
  • Action out() supports relations and creates more compact format.
  • Out-of-bounds tracking of ways (experimental).
  • Code reorganized.

Smrender is now able to create tiles as specified in the OSM wiki to act as a renderer for online maps. Have a look at this post for an example.
From a user’s perspective it is also new that Smrender now supports conditional rendering. This is that rules can dynamically be enabled or disabled during rendering based on matching OSM objects in the input data. The new actions available for this are enable_rule() and disable_rule() which toggle the visibility of an object. By default if no visibility is set all rules are enabled (visible=’true’).

The area of rendering can now be specified by defining a bounding box with the left lower and right upper corner. This box might not fit onto the page depending on the page format because of the requirements of the Mercartor projection in which case Smrender will re-size the bounding box automatically or it re-sizes the page according to the bounding box. This depends on the command line options (see option -P).

It turns out that the highly complex action cat_poly() for closing open and incomplete polygons did not work in some corner cases. This was fixed (function trim_ways() in smcoast.c).

The Auto-rotation was complete rewritten. Smrender does not depend on a static background color setting defined in the rule set. Instead it calculates the color difference between the foreground (the caption) and the background image at any angle and selects the one with the highest value. This should be the place of the best visibility. Most of the code is found in memimg.c.

The new action neighbortile() creates config files for the ends of ways. These files are organized in a “tile-style” directory and contain information about the area of those tiles. This feature can be used to automatically track ways (rivers, the coastline,…) if they leave the edges of the page.

The code was reorganized to have all common functions in libsmrender.so. This was necessary to be able to build third-party libraries on Cygwin on Windows because Windows DLLs do not allow to have unresolved symbols. Please note that running Smrender on Windows is still experimental mainly because the current standard Cygwin installation seems to run in 32-bit mode. Thus, Smrender will not be able to memory map input files with a size of more than 2 GBytes. Other limitations may also exist because the long-type has just 32 bits as well. Smrender is only tested on native 64 bit systems.

All new features are (hopefully) documented in the new documentation on the Smrender project page.1 Have fun testing and using these new features and don’t hesitate to contact me if you have questions or suggestions.

Comments are closed.