protomaps / basemaps

Basemap PMTiles generation and cartographic styles for OpenStreetMap data and more
https://maps.protomaps.com/
Other
369 stars 46 forks source link

Too many places visible at zoom 8, 9, and 10 #116

Open nvkelso opened 1 year ago

nvkelso commented 1 year ago

While fixing https://github.com/protomaps/basemaps/issues/89 to add more state (region) labels, I inadvertently also added more locality labels. This was OK in the United States and Europe, but looks far too dense in India and China.

The grid size should probably be coarser at these mid-zooms (to disallow smaller rural localities from backfilling less populated areas of the map), and the number of allowed place labels should be slightly reduced (This could improve flickering in Paris at zoom 10).

private static final ZoomFunction<Number> LOCALITY_GRID_SIZE_ZOOM_FUNCTION =
    ZoomFunction.fromMaxZoomThresholds(Map.of(
      6, 32,
      7, 64
    ), 0);

  private static final ZoomFunction<Number> LOCALITY_GRID_LIMIT_ZOOM_FUNCTION =
    ZoomFunction.fromMaxZoomThresholds(Map.of(
      6, 8,
      7, 6,
      9, 4
    ), 0);
makella commented 1 year ago

@nvkelso also seeing this starting around z6 in the US and Mexico!

Screen Shot 2023-09-11 at 3 37 25 PM
bdon commented 1 year ago

More screenshots would be appreciated!

I think this needs small tweaks in the grid parameters, ideally we can test a few variations and compare screenshots directly.

makella commented 1 year ago

ok, no problem! let me know if these are helpful

Example in Mexico - to Mexico City

z5:

Screen Shot 2023-09-12 at 5 13 07 PM

z6:

Screen Shot 2023-09-12 at 5 13 33 PM

z7:

Screen Shot 2023-09-12 at 5 13 57 PM

z8:

Screen Shot 2023-09-12 at 5 14 23 PM

z9:

Screen Shot 2023-09-12 at 5 15 42 PM

z10: Mexico City label disappears

Screen Shot 2023-09-12 at 5 16 13 PM

z11:

Screen Shot 2023-09-12 at 5 17 02 PM

Example in the US - z6 there is noticeable increase and then again at z8

z5:

Screen Shot 2023-09-12 at 5 05 50 PM

z6:

Screen Shot 2023-09-12 at 5 06 42 PM

z7:

Screen Shot 2023-09-12 at 5 07 31 PM

z8:

Screen Shot 2023-09-12 at 5 08 54 PM

z9:

Screen Shot 2023-09-12 at 5 09 44 PM

z10:

Screen Shot 2023-09-12 at 5 10 31 PM
bdon commented 7 months ago

have 2 style layers for this so the big cities are labeled before admin-1 labels