Wildert


just as a side project, I'm trying to place virtual earth tiles onto a sphere made in WPF. I am using the 4 largest tiles created as a single PNG. My problem is with placing the texture coordinates, the continents are all the wrong size because I don't know what parts of the tile to match with the spheres latitudes (because I don't know where the latitudes are on the tile). Anyone know to identify latitudes on the tile the equator and the ends are no brainers, but in between...no idea.

2d image

http://farm1.static.flickr.com/124/329370551_124631d76b_m.jpg

3d attempt

http://farm1.static.flickr.com/145/329370550_16df4d398d_m.jpg




Re: Place VE Tiles onto sphere


Re: Place VE Tiles onto sphere

Wildert

Note that I have already read both of these, I don't think either directly addresses how to place VE tiles onto a sphere (unless someone can tell me how to use proj4 to do it)




Re: Place VE Tiles onto sphere

Wildert

Finally figured it out, embarrasing - didn't notice that VE only went between 85 and -85 latitude. once I realized this,

mercator spacing = ln(tan(lat) + sec(lat))

Latitude (deg) Latitude (rad) Mercator spacing Mercator spacing scaled so 3.13 = 256 pixels
0 0 0 0
10 0.174532925 0.17542583 14.34196445
20 0.34906585 0.356378505 29.13577697
30 0.523598776 0.549306144 44.90860446
40 0.698131701 0.762909652 62.37179059
45 0.785398163 0.881373587 72.05682698
50 0.872664626 1.010683189 82.62855245
60 1.047197551 1.316957897 107.6680862
70 1.221730476 1.735415163 141.8791214
80 1.396263402 2.436246054 199.1756537
85 1.483529864 3.131301331 256

and thats how I draw my latitude lines on my image