FLUTTER ECOSYSTEM

polylabel

A fast algorithm for finding polygon pole of inaccessibility implemented as a Dart library. Useful for optimal placement of a text label on a polygon.

Latest version
1.0.1
30-day downloads
266K
Likes
10
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

Polylabel is a Dart implementation of a fast algorithm to find the pole of inaccessibility of a polygon—the point inside the polygon farthest from any edge. This is particularly useful for placing text labels optimally within irregular shapes, ensuring maximum visibility and readability. The library is efficient and cross-platform, supporting all major operating systems. It's ideal for geographic applications, map visualization, and UI design where label positioning matters.

Use cases
  • Optimal label placement on maps
  • Finding center points for irregular polygons
  • Improving UI readability in complex layouts
  • Geospatial data visualization
  • Automated annotation in GIS applications
Key features
  • Fast computation of polygon poles
  • Cross-platform compatibility
  • Simple API for integration
  • Accurate results for concave and convex polygons
  • Lightweight and dependency-free
Suitable for
  • Map and GIS developers
  • UI/UX designers working with polygons
  • Applications requiring automated label positioning
  • Data visualization tools
  • Geospatial analysis projects
Considerations
  • Best suited for 2D planar polygons
  • Not optimized for extremely large or complex geometries
  • Requires input as closed polygon coordinates
  • Limited to single-polygon inputs
  • Performance may vary with high vertex counts
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add polylabel

Categories

Dependencies

Dependency list 1 items

Source repository

Related projects