MinScaleDenominator

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — MinScaleDenominator
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Baso Minangkabau · bosanski · brezhoneg · català · čeština · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · português do Brasil · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 吴语 · 粵語 · 中文(繁體)‎ · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް

In a Mapnik XML Stylesheet the MinScaleDenominator indicates the minimum map scale at which a symbol or feature should be rendered.

One inch to the mile maps have a scale of 1:63,360, so setting MinScaleDenominator to be 63360 would mean that the symbol or feature would only appear when you render at a scale showing more detail than 1 inch to the mile.

Working out the map scale is a bit tricky. If you are rendering an area of 5,000 * 5,000 Spherical Mercator co-ordinates (ie. 5km * 5km) into a 1024 * 1024 pixel image then your map scale will be about 5m/pixel. Each pixel is assumed to be 0.28mm on your computer screen, so the scale value for your map would then be 5,000 mm / 0.28 mm which is approximately 18000.

Below is a table which shows the relation between zoomlevel and scale and which may help to see at which zoomlevel a feature is rendered or not:

Zoomlevel Scale
0 559.082.264
1 279.541.132
2 139.770.566
3 69.885.283
4 34.942.642
5 17.471.321
6 8.735.660
7 4.367.830
8 2.183.915
9 1.091.958
10 545.979
11 272.989
12 136.495
13 68.247
14 34.124
15 17.062
16 8.531
17 4.265
18 2.133
19 1.066
20 533

Example: If you set MaxScaleDenominator inside of a style-file (eg. osm.xml) for a feature to 18.000 (without setting a MinScaleDenominator) this feature will be rendered on all tiles for zoomlevel 15 and higher.

If you want to know more about map scales, look at this link: ScaleAndPpi.