Skip to content

Commit 3054012

Browse files
committedMay 3, 2020
Be a bit less aggresive at pruning small feature polygon label candidates
1 parent 9dec1dd commit 3054012

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/core/pal/feature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ std::size_t FeaturePart::createCandidatesOutsidePolygon( std::vector<std::unique
18751875
const double ringLength = ring->length();
18761876
const double circleArea = std::pow( ringLength, 2 ) / ( 4 * M_PI );
18771877
const std::size_t candidatesForArea = static_cast< std::size_t>( std::ceil( mLF->layer()->mPal->maximumPolygonCandidatesPerMapUnitSquared() * circleArea ) );
1878-
const std::size_t targetPolygonCandidates = std::max( static_cast< std::size_t >( 4 ), maxPolygonCandidates > 0 ? std::min( maxPolygonCandidates, candidatesForArea ) : candidatesForArea );
1878+
const std::size_t targetPolygonCandidates = std::max( static_cast< std::size_t >( 16 ), maxPolygonCandidates > 0 ? std::min( maxPolygonCandidates, candidatesForArea ) : candidatesForArea );
18791879

18801880
// assume each position generates one candidate
18811881
const double delta = ringLength / targetPolygonCandidates;

‎src/core/pal/pal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ std::unique_ptr<Problem> Pal::extract( const QgsRectangle &extent, const QgsGeom
312312
break;
313313

314314
case GEOS_POLYGON:
315-
maxCandidates = std::max( static_cast< std::size_t >( 4 ), feat->feature->maximumPolygonCandidates() );
315+
maxCandidates = std::max( static_cast< std::size_t >( 16 ), feat->feature->maximumPolygonCandidates() );
316316
break;
317317
}
318318

0 commit comments

Comments
 (0)
Please sign in to comment.