[Tile-serving] [osm2pgsql] Add area reprojection facility (#454)

Sarah Hoffmann notifications at github.com
Sun Oct 25 07:33:32 UTC 2015


> +
> +        *lon = (*lon) * EARTH_CIRCUMFERENCE / 360.0;
> +        *lat = log(tan(M_PI/4.0 + (*lat) * DEG_TO_RAD / 2.0)) * EARTH_CIRCUMFERENCE/(M_PI*2);
> +        return;
> +    }
> +
> +    x[0] = *lon;
> +    y[0] = *lat;
> +    z[0] = 0;
> +
> +    /** end of "caution" section. */
> +
> +    pj_transform(pj_target, pj_tile, 1, 1, x, y, z);
> +
> +    *lat = y[0];
> +    *lon = x[0];

x and y are unnecessary here. Simply use lat and lon as parameters to pj_transform.

Also: the stray 'caution' comment still needs to be deleted.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/454/files#r42942196
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20151025/145814b7/attachment.html>


More information about the Tile-serving mailing list