You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Pages: 1
#1 2016-03-15 15:10:45
- Bytechanger
- Member
- Registered: 2009-06-17
- Posts: 77
SlippyMap question tile coordinates
Hi,
I want to render a map on a ASP.NET Server.
I use a slippy map-stucture (http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames)
zoom\x\y.png
I use the wiki code to transform coordinates to NW-Side of a png-picture file.
What I don´t understand, how can I calc the NE, SW, SE side of the picture.
In code it says NE = x+1 / y .png
SW = X/Y+1 .png and so on.
But x+1 is also the NW of the next tile... So NE of one tile cannot be the same as NW of the next?
They doesn´t overlay, so I have to substract something (for 1 pixel) ?? ....
Can someone help me?
Greets
Byte
Offline
#2 2016-03-16 17:29:25
- stephan75
- Member
- Registered: 2008-05-28
- Posts: 2,918
Re: SlippyMap question tile coordinates
If no answer here, try to ask (or search first!) at http://gis.stackexchange.com
Offline
#3 2016-03-17 08:15:12
- ivanatora
- Member
- Registered: 2011-04-05
- Posts: 70
Re: SlippyMap question tile coordinates
I don't get your question. Maybe try to draw a picture?
Numbers of a NE of a subtile has coordinates [2x+1, 2y]
Numbers of a NW of subtile of the next eastern tile is [2x, 2y]
So, if tile A has x coordinate of 4, his NE subtile would have x component of 9
If next tile B has x coordinate of 5, his NW subtile would have x component of 10
Example: This tile http://a.tile.openstreetmap.org/3/4/2.png has a NE subtile http://b.tile.openstreetmap.org/4/9/4.png
Next tile http://b.tile.openstreetmap.org/3/5/2.png has a NW subtile http://c.tile.openstreetmap.org/4/10/4.png
Offline
Pages: 1