Frederik Ramm
2012-06-26 21:05:47 UTC
Hi,
I have had some people asking whether I could supply them with
"Retina" map tiles. "Retina" is an Apple brand name for higher
resolution displays, and these users tend to mean tiles with twice the
resolution.
I wonder if anyone has done this already. I can think of a number of
possible angles to attack this:
1. Double all font sizes, line widths, etc. in the Mapnik style file
(recent Mapnik versions also have a built-in scaling option that
achieves about the same) and adapt all scale denominators accordingly.
This would mean that meta tile size, tile size, and everything else
would remain unchanged but you'd be shifting everything by one zoom
level - what was on one z16 tile before is now on four z17 tiles. The
"Retina" user would see less detail on the same zoom level and therefore
would have to go down to z19 to see what is currently shown on 18.
Also, font nastiness along the metatile edges would increase; the amount
of font nastiness depends on the ratio of tile size to font size, so
doubling font sizes and keeping metatile sizes will increase label
clipping and other strange things. (Simply increasing the buffer doesn't
help.)
2. Modify style as per 1., but also double the size of meta tiles to
4096x4096. Cut 16x16 normal tiles out of one meta tile, rather than 8x8.
This avoids the increase in font nastiness but requires internal
processes to adapt to larger metatiles. The "zoom level shift" problem
is the same as in 1.
3. Modify style as per 1., double size of meta tiles to 4096x4096, and
double size of tiles to 512x512. This avoids the increase in font
nastiness *and* it has the nice effect that one "Retina" tile at a
certain zoom level shows exactly the same content as a normal tile, just
on 512x512 instead of 256x256 and therefore at twice the resolution. It
would, however, require clients (OpenLayers et al.) to work with the
larger tile size.
Your thoughts on these options - are there more than these three,
perhaps? - would be most welcome.
("Tiles for printing" is a very similar issue - "print" users tend to
want quad-resolution tiles, and again you have the options of shifting
the zoom level by 2 or making 1024x1024 tiles.)
Bye
Frederik
I have had some people asking whether I could supply them with
"Retina" map tiles. "Retina" is an Apple brand name for higher
resolution displays, and these users tend to mean tiles with twice the
resolution.
I wonder if anyone has done this already. I can think of a number of
possible angles to attack this:
1. Double all font sizes, line widths, etc. in the Mapnik style file
(recent Mapnik versions also have a built-in scaling option that
achieves about the same) and adapt all scale denominators accordingly.
This would mean that meta tile size, tile size, and everything else
would remain unchanged but you'd be shifting everything by one zoom
level - what was on one z16 tile before is now on four z17 tiles. The
"Retina" user would see less detail on the same zoom level and therefore
would have to go down to z19 to see what is currently shown on 18.
Also, font nastiness along the metatile edges would increase; the amount
of font nastiness depends on the ratio of tile size to font size, so
doubling font sizes and keeping metatile sizes will increase label
clipping and other strange things. (Simply increasing the buffer doesn't
help.)
2. Modify style as per 1., but also double the size of meta tiles to
4096x4096. Cut 16x16 normal tiles out of one meta tile, rather than 8x8.
This avoids the increase in font nastiness but requires internal
processes to adapt to larger metatiles. The "zoom level shift" problem
is the same as in 1.
3. Modify style as per 1., double size of meta tiles to 4096x4096, and
double size of tiles to 512x512. This avoids the increase in font
nastiness *and* it has the nice effect that one "Retina" tile at a
certain zoom level shows exactly the same content as a normal tile, just
on 512x512 instead of 256x256 and therefore at twice the resolution. It
would, however, require clients (OpenLayers et al.) to work with the
larger tile size.
Your thoughts on these options - are there more than these three,
perhaps? - would be most welcome.
("Tiles for printing" is a very similar issue - "print" users tend to
want quad-resolution tiles, and again you have the options of shifting
the zoom level by 2 or making 1024x1024 tiles.)
Bye
Frederik
--
Frederik Ramm ## eMail frederik at remote.org ## N49?00'09" E008?23'33"
Frederik Ramm ## eMail frederik at remote.org ## N49?00'09" E008?23'33"