From fb346ecf4fda53ccac7ef939bc6ec84a361a9d58 Mon Sep 17 00:00:00 2001 From: nirvn Date: Wed, 10 Aug 2016 17:33:35 +0700 Subject: [PATCH] fix repeated labels on curved lines when label width > repeat distance --- src/core/pal/layer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/pal/layer.cpp b/src/core/pal/layer.cpp index 4845291af8c2..e00b438bccd9 100644 --- a/src/core/pal/layer.cpp +++ b/src/core/pal/layer.cpp @@ -426,6 +426,7 @@ void Layer::chopFeaturesAtRepeatDistance() double chopInterval = fpart->repeatDistance(); if ( chopInterval != 0. && GEOSGeomTypeId_r( geosctxt, geom ) == GEOS_LINESTRING ) { + chopInterval *= ceil( fpart->getLabelWidth() / fpart->repeatDistance() ); double bmin[2], bmax[2]; fpart->getBoundingBox( bmin, bmax );