gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.54k stars 823 forks source link

When label does not fit in the center of area, render label off-center #1069

Open matkoniecz opened 10 years ago

matkoniecz commented 10 years ago

related to #957 but I am not sure is it doable

http://www.openstreetmap.org/?mlat=50.0917&mlon=19.9920#map=14/50.0917/19.9920 przechwytywanie

on zooming in label disappears

http://www.openstreetmap.org/way/54965742#map=16/50.0916/19.9924 przechwytywanie

daganzdaanda commented 9 years ago

In https://github.com/gravitystorm/openstreetmap-carto/issues/478#issuecomment-49591201, Vincent mentioned an interesting talk:

Maxim Rylov, Cartographically Plausible Label Placement. A Multi-criteria Model for Good Point-label Placement on OSM Maps http://sotm-eu.org/en/slots/16

From the Slides:

The model can be reproduced in your own solution or in Mapnik, GeoServer, Mapserver, etc.

A map with a sophisticated label placement for the whole globe http://openmapsurfer.uni-hd.de (OSM Roads layer)

The proposed model is implemented within the MapSurfer.NET framework http://openmapsurfer.uni-hd.de/Framework/info.html

The example map looks great (when you turn off the experimental boundaries). If you look at the Czech Republic, the "Cesko" moves south when "Praha" appears. Let's hope Mapnik can adapt these algorithms, if it hasn't yet.

dieterdreist commented 9 years ago

Am 22.05.2015 um 22:33 schrieb daganzdaanda notifications@github.com:

A map with a sophisticated label placement for the whole globe http://openmapsurfer.uni-hd.de (OSM Roads layer)

this is a improvement but still fails on Rome for certain zoom levels (disappears and reappears on zooming in)

kocio-pl commented 6 years ago

related to #957 but I am not sure is it doable

That would be possible with a placement type grid, if it was merged into the Mapnik and available in the Carto CSS - see #2962.

kocio-pl commented 6 years ago

Maxim Rylov, Cartographically Plausible Label Placement.

Interesting to compare the label placement density in OSM Carto/GMaps then (2014) and now (2017)...

Then - 5 vs 54:

zrzut ekranu z 2017-11-28 14-56-46

Now - 9 vs 27: screenshot-2017-11-28 map compare geofabrik tools

kocio-pl commented 6 years ago

More about Google change in the number of labels:

https://www.justinobeirne.com/what-happened-to-google-maps

jeisenbe commented 5 years ago

Requires change to v5.x since we would need to require a new Mapnik version, correct?

kocio-pl commented 5 years ago

I think you're right.

jeisenbe commented 5 years ago

OK, that should happen fairly soon, so that the unpaved rendering PR can be deployed.