X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/7e5cbe87ed37f9cba8224fa4049047d7f981f66a..HEAD:/db/functions/quadtile.c diff --git a/db/functions/quadtile.c b/db/functions/quadtile.c deleted file mode 100644 index 0f787b739..000000000 --- a/db/functions/quadtile.c +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include -#include - -Datum -tile_for_point(PG_FUNCTION_ARGS) -{ - double lat = PG_GETARG_INT32(0) / 10000000.0; - double lon = PG_GETARG_INT32(1) / 10000000.0; - - PG_RETURN_INT64(xy2tile(lon2x(lon), lat2y(lat))); -} - -PG_FUNCTION_INFO_V1(tile_for_point); - -/* - * To bind this into PGSQL, try something like: - * - * CREATE FUNCTION tile_for_point(int4, int4) RETURNS int8 - * AS '/path/to/rails-port/db/functions/libpgosm', 'tile_for_point' - * LANGUAGE C STRICT; - * - * (without all the *s) - */ - -#ifdef PG_MODULE_MAGIC -PG_MODULE_MAGIC; -#endif