X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/33a65a90c9d0e2ab121e1da9c3efedaf9e6a9789..cfbdd3f7e1c688e2c875ded9fd847fcc1c3a4caf:/db/functions/quadtile.c diff --git a/db/functions/quadtile.c b/db/functions/quadtile.c index 7d17f6f76..d60189245 100644 --- a/db/functions/quadtile.c +++ b/db/functions/quadtile.c @@ -24,8 +24,8 @@ void tile_for_point_deinit(UDF_INIT *initid) long long tile_for_point(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) { - long long lon = *(long long *)args->args[0]; - long long lat = *(long long *)args->args[1]; + long long lat = *(long long *)args->args[0]; + long long lon = *(long long *)args->args[1]; - return xy2tile(lon2x(lon / 1000000.0), lat2y(lat / 1000000.0)); + return xy2tile(lon2x(lon / 10000000.0), lat2y(lat / 10000000.0)); }