Skip to content

polylabel hanging with degenerate case #51

@RossRogers

Description

@RossRogers

A user added a polygon to my system that is a degenerate case. This causes function polylabel to spin forever. The polygon has almost no height at all, causing a minuscule height on this line:

var cellSize = Math.min(width, height);

height is 4.97e-14 and width is 0.0017.

This causes the following for loop to spin for a very long time:

for (var x = minX; x < maxX; x += cellSize) {
[...]

Precision is set to 1.0. Shouldn't cellSize be bounded in minimum size by the precision somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions