7 my_bool tile_for_point_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
9 if ( args->arg_count != 2 ||
10 args->arg_type[0] != INT_RESULT ||
11 args->arg_type[1] != INT_RESULT )
13 strcpy( message, "Your tile_for_point arguments are bogus!" );
20 void tile_for_point_deinit(UDF_INIT *initid)
25 long long tile_for_point(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
27 long long lat = *(long long *)args->args[0];
28 long long lon = *(long long *)args->args[1];
30 return xy2tile(lon2x(lon / 10000000.0), lat2y(lat / 10000000.0));