I'm trying to determine how the "TILE" field in the current_nodes table is calculated based off of the latitude and longitude.

I've seen the slippy map tile names and understand the concept of xtile vs. ytile. But I am failing to see the correlation between xtile, ytile, and the TILE value as seen in the current_nodes table. I've seen a write up on Bing about how Bing makes the conversion, and it seems similar, but not exact to what OSM is doing. Any ideas?

As an example, using the following latitude and longitude, you should get the following:
Lat: 52.5164839
Lng: 13.3817427
Tile: 3502687520

asked 11 Dec '14, 07:19

jhilll's gravatar image

jhilll
16113
accept rate: 0%

edited 11 Dec '14, 07:22


The "tile" column in the current_nodes table has nothing to do with map tiles. See https://github.com/openstreetmap/openstreetmap-website/blob/master/lib/quad_tile/quad_tile.h for how to compute the value.

permanent link

answered 11 Dec '14, 09:02

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
70.0k806341097
accept rate: 24%

Your answer
toggle preview

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:

×46
×33
×1

question asked: 11 Dec '14, 07:19

question was seen: 4,457 times

last updated: 11 Dec '14, 09:02

powered by OSQA