NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I was just taking a look at the osm slippy map tiling scheme and i observed that although at zoom level 1 the split along y (latitude) seems exactly half (-85 deg to 0 deg to 85 deg), at zoom level 2 the splitting is quite uneven (0 to 66 deg to 85 deg). As a result if i try to download a tile assuming even splitting there seems to be significant difference. Can you tell me why the split is such and is there any way it could be mapped to a perfectly splitting tiling scheme?

asked 13 Oct '13, 15:32

raveesh's gravatar image

raveesh
1111
accept rate: 0%

What is your actual problem? If you want to determine the name of the slippy map tile for a given latitude, longitude and zoom level then just read the slippy map tilenames wiki page.

(13 Oct '13, 15:49) scai ♦

Actually in my app, i have a map with perfectly splitting tiling scheme(latitude -> -90, -45, 0, 45, 90). I was trying to see if i could download and attach some osm images on top of these tiles for some particular country. But due to the difference the data is quite different from what i expect. Hence on Africa, i almost end up mapping Europe. My only question is why was it chosen to be uneven and how can i still make use of it in a perfecty even tiling scheme environment?

(13 Oct '13, 17:05) raveesh

I don't know why it was chosen like this but the only solutions seems to be cutting and stitching. Use the formula to calculate which and how many OSM tiles are required in order to create a specific tile for your application. Then download them (without violating the tile usage policy) and generate your tile from it. Or just use a WMS server which does all the magic for you.

(13 Oct '13, 17:11) scai ♦

This has to do with the projection being used. This is usually mercator, which doesn't use the same scale near the equator and near the poles. The tiles always split the previous zoom's image evenly, but that original image may be deformed in ways you didn't expect.

However, it is possible to setup a slippymap with a different projection setting for mapnik. If you want all tiles from a given zoomlevel to span as many degrees latitude as longitude, try the equirectangular projection. However, remember that no projection is perfect, and you'll need to deal with deformations one way or another.

One way to sidestep the deformation problem is to use a 3D renderer like marble, which takes the mercator-projected tiles from OSM and reprojects them on a globe.

permanent link

answered 14 Oct '13, 13:17

Vincent%20de%20Phily's gravatar image

Vincent de P... ♦
17.3k18152249
accept rate: 19%

The splitting is not uneven. The map goes from -85 to +85 latitude on all zoom levels, and from coordinate "0" to coordinate "2**z-1" on all zoom levels.

permanent link

answered 13 Oct '13, 17:13

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

I am sorry, i didnt get it. At zoom level 0 we have one tile covering the entire earth (-85 to +85 latitude and -180 to +180 longitude) . At zoom level 1 there are 4 tiles (-85 to 0 and 0 to 85 in latitude and -180 to 0 and 0 to 180 in longitude). But at zomm level 2 the split becomes uneven ( -85 to -66, -66 to 0, 0 to 66, 66 to 85 in latitude and -180 to -90, -90 to 0, 0 to 90, 90 to 180 in longitude). So in longitude it still remains perfectly half splitting but in latitude it doesnt. Am i wrong?

(13 Oct '13, 17:40) raveesh

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×35

question asked: 13 Oct '13, 15:32

question was seen: 6,202 times

last updated: 14 Oct '13, 13:17

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum