X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/33a65a90c9d0e2ab121e1da9c3efedaf9e6a9789..HEAD:/db/functions/quadtile.c diff --git a/db/functions/quadtile.c b/db/functions/quadtile.c deleted file mode 100644 index 7d17f6f76..000000000 --- a/db/functions/quadtile.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include -#include -#include - -my_bool tile_for_point_init(UDF_INIT *initid, UDF_ARGS *args, char *message) -{ - if ( args->arg_count != 2 || - args->arg_type[0] != INT_RESULT || - args->arg_type[1] != INT_RESULT ) - { - strcpy( message, "Your tile_for_point arguments are bogus!" ); - return 1; - } - - return 0; -} - -void tile_for_point_deinit(UDF_INIT *initid) -{ - return; -} - -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]; - - return xy2tile(lon2x(lon / 1000000.0), lat2y(lat / 1000000.0)); -}