You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

## #1 2007-12-01 13:01:14

**toralf****Member**- Registered: 2007-11-10
- Posts: 18

### Convert LAT in Ytile value

Hi,

I try to convert LAT in YTile values.

Reading the wiki I got the formulas. And with this converter I got the values that the formulas should yield to.

For Zoom equal to 12 and LAT equal to 53.051600, the Ytile value should be 1333

But when I use the formula:

`ytile := Floor((1 - Log( Tan(Lat * Pi / 180) + 1 / Cos(Lat * Pi / 180)) / Pi ) / 2 * 2** zoom)`

I get YTile = 1737. and this is the wrong value.

Where have I done something wrong?

Thanks.

ciao toralf

Offline

## #2 2007-12-01 13:53:13

**Lambertus****Administrator**- From: Apeldoorn (NL)
- Registered: 2007-03-17
- Posts: 3,269
- Website

### Re: Convert LAT in Ytile value

morwen wrote:

Please tell toralf that the answer to his question is to make sure to use natural log, not log10

Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

## #3 2007-12-01 13:56:25

**toralf****Member**- Registered: 2007-11-10
- Posts: 18

### Re: Convert LAT in Ytile value

Thank you.

That was the problem. I had to use LN()

Much appreciated

ciao toralf

Offline

Pages: **1**