Home / Companies / Felt / Blog / Post Details
Content Deep Dive

How Tippecanoe makes Felt’s polygons look good, part 1: choosing good label points

Blog post from Felt

Post Details
Company
Date Published
Author
Erica Fischer, Engineer
Word Count
1,626
Company Posts That Month
8
Language
English
Hacker News Points
-
Post removed?
No
Summary

Felt has integrated Tippecanoe, a geodata pre-processing tool, to enhance the visual representation of data at various zoom levels in web maps, focusing particularly on optimizing label placement for polygons. Challenges such as choosing optimal label points and simplifying contiguous polygons without gaps have been addressed. Initially, label anchors were generated using the GEOSPointOnSurface function, but this method posed performance issues and sometimes resulted in unsatisfactory placements. Alternatives like the Polylabel algorithm and Turf's center-of-mass algorithm were explored, with the latter often offering a better balance between speed and aesthetics. However, further refinements were needed to ensure labels are placed acceptably within their polygons, avoiding borders or holes. Tippecanoe's approach also includes sorting coordinates, using grids, and, if necessary, defaulting to centroids, to find suitable label points. Duplicate labels are employed at higher zoom levels to improve map readability, and the overall process reflects a continuous effort to solve complex algorithmic problems in mapping.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.