|
| 1 | +DROP FUNCTION IF EXISTS "MixedCase".function_dup(int, int, int); |
| 2 | +CREATE OR REPLACE FUNCTION "MixedCase".function_dup("Z" int, x int, y int) |
| 3 | +RETURNS TABLE("mVt" bytea, key text) AS $$ |
| 4 | + SELECT mvt, md5(mvt) as key FROM ( |
| 5 | + SELECT ST_AsMVT(tile, '"MixedCase".function_Dup', 4096, 'geom') as mvt FROM ( |
| 6 | + SELECT |
| 7 | + ST_AsMVTGeom( |
| 8 | + ST_Transform(ST_CurveToLine("Geom"), 3857), |
| 9 | + ST_TileEnvelope("Z", x, y), |
| 10 | + 4096, 64, true) AS geom |
| 11 | + FROM "MixedCase"."MixPoints" |
| 12 | + WHERE "Geom" && ST_Transform(ST_TileEnvelope("Z", x, y), 4326) |
| 13 | + ) as tile WHERE geom IS NOT NULL) src |
| 14 | +$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE; |
| 15 | + |
| 16 | +DROP FUNCTION IF EXISTS "MixedCase"."function_Dup"(int, int, int); |
| 17 | +CREATE OR REPLACE FUNCTION "MixedCase"."function_Dup"("Z" int, x int, y int) |
| 18 | +RETURNS TABLE("mVt" bytea, key text) AS $$ |
| 19 | + SELECT mvt, md5(mvt) as key FROM ( |
| 20 | + SELECT ST_AsMVT(tile, '"MixedCase".function_Dup', 4096, 'geom') as mvt FROM ( |
| 21 | + SELECT |
| 22 | + ST_AsMVTGeom( |
| 23 | + ST_Transform(ST_CurveToLine("Geom"), 3857), |
| 24 | + ST_TileEnvelope("Z", x, y), |
| 25 | + 4096, 64, true) AS geom |
| 26 | + FROM "MixedCase"."MixPoints" |
| 27 | + WHERE "Geom" && ST_Transform(ST_TileEnvelope("Z", x, y), 4326) |
| 28 | + ) as tile WHERE geom IS NOT NULL) src |
| 29 | +$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE; |
| 30 | + |
| 31 | +DROP FUNCTION IF EXISTS "MixedCase".function_dup(int, int, int, json); |
| 32 | +CREATE OR REPLACE FUNCTION "MixedCase".function_dup(z int, x int, y int, query json) |
| 33 | +RETURNS TABLE("mVt" bytea, key text) AS $$ |
| 34 | + SELECT mvt, md5(mvt) as key FROM ( |
| 35 | + SELECT ST_AsMVT(tile, '"MixedCase".function_Dup', 4096, 'geom') as mvt FROM ( |
| 36 | + SELECT |
| 37 | + ST_AsMVTGeom( |
| 38 | + ST_Transform(ST_CurveToLine("Geom"), 3857), |
| 39 | + ST_TileEnvelope(z, x, y), |
| 40 | + 4096, 64, true) AS geom |
| 41 | + FROM "MixedCase"."MixPoints" |
| 42 | + WHERE "Geom" && ST_Transform(ST_TileEnvelope(z, x, y), 4326) |
| 43 | + ) as tile WHERE geom IS NOT NULL) src |
| 44 | +$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE; |
| 45 | + |
| 46 | +DROP FUNCTION IF EXISTS "MixedCase".function_dup(int, int, int, jsonb); |
| 47 | +CREATE OR REPLACE FUNCTION "MixedCase".function_dup(z int, x int, y int, query jsonb) |
| 48 | +RETURNS TABLE("mVt" bytea, key text) AS $$ |
| 49 | + SELECT mvt, md5(mvt) as key FROM ( |
| 50 | + SELECT ST_AsMVT(tile, '"MixedCase".function_Dup', 4096, 'geom') as mvt FROM ( |
| 51 | + SELECT |
| 52 | + ST_AsMVTGeom( |
| 53 | + ST_Transform(ST_CurveToLine("Geom"), 3857), |
| 54 | + ST_TileEnvelope(z, x, y), |
| 55 | + 4096, 64, true) AS geom |
| 56 | + FROM "MixedCase"."MixPoints" |
| 57 | + WHERE "Geom" && ST_Transform(ST_TileEnvelope(z, x, y), 4326) |
| 58 | + ) as tile WHERE geom IS NOT NULL) src |
| 59 | +$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE; |
0 commit comments