Rendering Town names on each image


I using nik2img for rendering image at defined coordinates.

Image itself is fine. But default style (of something else) is made for tile rendering and sometimes rendered images do not have some place names (towns, roads) as these names placed outside of defined box (as shown on

What should I do to place names on image, if it overlaps area or way.

Quick and ugly solution:

— a/plugins/input/postgis/postgis_datasource.cpp
+++ b/plugins/input/postgis/postgis_datasource.cpp
@@ -632,7 +632,10 @@ featureset_ptr postgis_datasource::features(const query& q) const
s << “ST_Simplify(”;

  •        s << "ST_Intersection(";
  •        s << "\"" << geometryColumn_ << "\"";
  •        s << ", " << sql_bbox(box) << ") ";
           if (simplify_geometries_) {
               // 1/20 of pixel seems to be a good compromise to avoid

Intersect everything with bounding box, so labels will be inside image. Noticeable slow down, but speed is not critical to me.