Why not ask your question on the new OpenStreetMap Community Forum?


I am a developer and I need the function y=f(x)=? between the latitude (=x; -90 <= x <= 90) and the tile number on zoom level 16 (=y; 0 <= y <= 65536) for my mobile game. I exported the osm tiles with Maperitive and I need to convert the gps position of the phone to the tile number (x, y). I already have an algorithm to determine the x value of the tile number but I need the y value too. I can get the function by myself, but I would need to spend days on getting an accurate function because it seems to be a function with a degree over 10.
So anyone knows the function? Or maybe how to convert the tile numbers to meters? If you're wondering why I don't just simply implement osm to my game ... one reason is that I need to deactivate some labels for my game.

I attached three screenshots with the graph, the value table and the tiles for better understanding.

Full graph:

full graph

Part of the graph with value table:

alt text

Tiles generated with Maperitive (zoom level 16):

alt text

asked 26 Jun '17, 18:53

Time2Design's gravatar image

accept rate: 0%

permanent link

answered 26 Jun '17, 19:20

maxerickson's gravatar image

accept rate: 32%

thank you!

(26 Jun '17, 20:26) Time2Design
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 26 Jun '17, 18:53

question was seen: 2,730 times

last updated: 26 Jun '17, 20:26

powered by OSQA