]> git.openstreetmap.org Git - rails.git/commitdiff
Make the MySQL tile_for_point function take arguments in the same order
authorTom Hughes <tom@compton.nu>
Wed, 12 Sep 2007 17:46:03 +0000 (17:46 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 12 Sep 2007 17:46:03 +0000 (17:46 +0000)
as the ruby version.

db/functions/quadtile.c

index 7d17f6f76475076306df6e252fcb294162dea2e5..c0eb1ec3a38fdc57e00b74714bd398a505fb8a76 100644 (file)
@@ -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));
 }