osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.67k stars 1.02k forks source link

Highway label distortion #1756

Open kcwu opened 9 years ago

kcwu commented 9 years ago

For offline map, the label of highway will render along the curve of highway. If the highway is zigzag, e.g. hiking trails, the label is hard to read. For Chinese, this problem is severer.

In this example, the label of top highway is "Hu Shan Zi Ran Bu Dao". screenshot_20150930-002635

This Chinese label is "虎山自然步道". screenshot_20150930-002653

sonora commented 9 years ago

Yes, true. I had played with that some time ago, and found that not labeling along the course of the path makes it difficult to identify what the labels is actually for, as there can be many other labels in the vicinity for nature preserves, hamlets, etc.

From what I experimented, I found it best to live with that as is. For very crooked paths, you need to zoom in further until the bends in the path get reasonably stretched, then you can easily read every label.

kcwu commented 9 years ago

Idea to mitigation: Before rendering the label, "simplify" the path first. I guess we don't need complicated algorithm like Ramer–Douglas–Peucker algorithm, simple rule like "remove nodes if they are too close (say, <50px, depends on font size)" is good enough.

532910 commented 6 years ago

same for cyrillic font and river good: screenshot_osmand _20180916-024201

absolutely unreadable: screenshot_osmand _20180916-024228