Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maxzoom for layer state-names ? #366

Closed
Florimondable opened this issue May 17, 2020 · 6 comments · Fixed by #364
Closed

Add maxzoom for layer state-names ? #366

Florimondable opened this issue May 17, 2020 · 6 comments · Fixed by #364
Labels
enhancement An already rendered feature which should be improved.

Comments

@Florimondable
Copy link
Member

Max zoom state-names is drawn depending of the size of the state.
State is for adminborder level 4 https://wiki.openstreetmap.org/wiki/Tag:boundary=administrative (region in France)
Though I didn't found example where they are drawn >z12, so I propose to set maxzoom at 13

Here sql result for z16 :

./test_sql.sh ../../project.mml --zoom 16 --db osm ....
+-----------+----------------+-----------------------------+-----------------+---------------------------+
| Time (ms) | #lines fetched |            Layer            | #fields fetched | Size (text format, in kB) |
+-----------+----------------+-----------------------------+-----------------+---------------------------+
|    3486   |     516278     |          roads_high         |        20       |           150688          |
|    1164   |     13432      |        amenities-poly       |        31       |            9878           |
|    1004   |     100487     |       amenities-points      |        31       |           10860           |
|    444    |      1931      |      highway_area_label     |        5        |            180            |
|    431    |      4874      |         landuse_gen1        |        4        |           19519           |
|    408    |     33865      |   roads-text-ref-low-zoom   |        6        |            8696           |
|    346    |     10092      |          area_label         |        5        |           10900           |
|    332    |      1380      |       landuse-overlay       |        5        |            7096           |
|    296    |      122       |          water_gen1         |        4        |            1232           |
|    292    |       15       |       military-overlay      |        5        |             19            |
|    291    |       36       |       protected-areas       |        6        |            765            |
|    287    |       1        |         state-names         |        5        |            511            |
|    284    |       0        |        country-names        |        0        |             0             |
|    260    |     12601      |            bridge           |        19       |            1994           |
|    221    |     19590      |            tunnel           |        19       |            4998           |
|    139    |      7615      |       placenames-small      |        7        |            661            |
|    118    |      1564      |        admin-mid-zoom       |        3        |           17190           |
|    106    |       1        |        capital-names        |        5        |             0             |
|    105    |      1433      | bicycle_routes_bicycle_gen3 |        5        |            2440           |
|    102    |      252       |      placenames-medium      |        6        |             18            |
|     86    |       1        |   bicycle_routes_mtb_gen3   |        5        |             2             |
|     85    |      1339      |    bicycle_routes_labels    |        7        |            2277           |
|     83    |       15       |         ferry-routes        |        2        |             9             |
|     74    |      1435      |         waterway_low        |        3        |            570            |
|     70    |      1266      |           aeroway           |        3        |            391            |
+-----------+----------------+-----------------------------+-----------------+---------------------------+
TOTAL: 25 layers in 10577ms with 729625 objets
@Florimondable
Copy link
Member Author

Same with country-names except that Vatican the smallest state on the World has its label disapear at zoom17
https://www.cyclosm.org/#map=16/41.9020/12.4572/cyclosm
So max zoom at 16

@Florimondable
Copy link
Member Author

for state-names the lowest zoom level I found is 11 for Trinidad https://www.openstreetmap.org/relation/7361803#map=11/10.2139/-61.2117
So max 10 should be good for everyone

country-names I propose max z14, only the Vatican is visible at Z14-z16 today

@Florimondable
Copy link
Member Author

Florimondable commented May 18, 2020

Well actualy there is no style associated with state-names
But I don't understand how they are rendered, if I comment the layer in project.mml states are no more rendered.

@Florimondable
Copy link
Member Author

Ok it's use class so it is .state in placenames.mss

Florimondable added a commit to Florimondable/cyclosm-cartocss-style that referenced this issue May 18, 2020
@Phyks
Copy link
Member

Phyks commented May 18, 2020

👍

Small comment on this: this part of the code was copy/pasted from osm-carto. So, we should probably double check we are not missing anything (osm-carto tends to be super optimized I think).

@Phyks Phyks added the enhancement An already rendered feature which should be improved. label May 18, 2020
@Florimondable
Copy link
Member Author

Osm-carto is may be super optimized (I'd not bet on that), though states/country names is not our main feature ;)

@Phyks Phyks mentioned this issue May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An already rendered feature which should be improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants