I have a set of PNG images downloaded from a service like:
http://tile.openstreetmap.org/{z}/{x}/{y}.png
The images are named:
09_118_180.PNG
09_119_180.PNG
etc.
How can I combine these image in FME and project them correctly?
I have a set of PNG images downloaded from a service like:
http://tile.openstreetmap.org/{z}/{x}/{y}.png
The images are named:
09_118_180.PNG
09_119_180.PNG
etc.
How can I combine these image in FME and project them correctly?
Best answer by jdh
OSM uses a slippy map.
To go from tile numbers to lat long use the following equations:
n = 2 ^ zoom lon_deg = xtile / n * 360.0 - 180.0
lat_rad = arctan(sinh(π * (1 - 2 * ytile / n)))
lat_deg = lat_rad * 180.0 / π
This returns the NW corner of the image. You can use xtile+0.5 and ytile+0.5 to get the center of the tile
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.