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
Language
English
Hacker News Points
-
Summary

Felt has integrated the geodata pre-processing tool Tippecanoe to enhance web map tile visualization by optimizing label placement for polygons, addressing algorithmic challenges, and improving user experience. The blog post details how Felt tackled the problem of choosing ideal label points within polygons using a combination of algorithms, including GEOS, Polylabel, and Turf's center-of-mass algorithm. Tippecanoe's label placement strategy involves checking the appropriateness of label points through the pnpoly algorithm and iterating through coordinate-sorted crossings, grids, and centroids to find optimal positions. The post also discusses the implementation of duplicate labels at higher zoom levels to improve user navigation and briefly mentions ongoing challenges in simplifying contiguous polygon geometries without introducing visual discrepancies.