This is my custom function to achieve the conversion of 4490 coordinate system
CREATE OR REPLACE
FUNCTION f_lrdl_4490(z integer, x integer, y integer)
RETURNS bytea AS $$
DECLARE
mvt bytea;m numeric;minx numeric;maxy numeric;maxx numeric;miny numeric;
BEGIN
m:=POWER(2,z);
minx := (x / m) * 360.0 - 180;
maxx := ((x + 1) / m) * 360.0 - 180;
miny := 90 - ((y + 1.0) / m) * 360.0;
maxy := 90 - (y / m) * 360.0;
SELECT INTO mvt ST_AsMVT(tile, 'f_lrdl_4490', 4096, 'geom') FROM (
SELECT
ST_AsMVTGeom(
ST_CurveToLine(smgeometry),
ST_MakeEnvelope(minx,miny,maxx,maxy,4490),
4096, 64, true) AS geom,rn,rteg,name,null as elementId,null as elementType
FROM pdc_lrdl
WHERE smgeometry && ST_MakeEnvelope(minx,miny,maxx,maxy,4490)
) as tile WHERE geom IS NOT NULL;
RETURN mvt;
END
$$ LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE;
It can be accessed and loaded normally, the following is a screenshot of the loading

This is the configuration file config.yaml of martin-cp
postgres:
- connection_string: postgresql://user:password@192.168.1.1:5432/postgis
functions:
f_lrdl_4490:
schema: public
function: f_lrdl_4490
This is the command I used to generate tiles using martin-cp
martin-cp --config mb_config.yaml --encoding brotli --output-file f_lrdl_4490.mbtiles --min-zoom 1 --max-zoom 10 --bbox 72.004,0.829,137.834,55.827 --source f_lrdl_4490
The generated f_lrdl_4490.mbtiles file is only 12MB. After publishing it to the service, I found that there is data only when z=1, x=1, y=0. Through database query, I found that the data returned by f_lrdl_4490(1, 1, 0) is indeed 12MB. Can martin-cp only generate the first level for custom functions?
This is my custom function to achieve the conversion of 4490 coordinate system
It can be accessed and loaded normally, the following is a screenshot of the loading
This is the configuration file config.yaml of martin-cp
This is the command I used to generate tiles using martin-cp
The generated f_lrdl_4490.mbtiles file is only 12MB. After publishing it to the service, I found that there is data only when z=1, x=1, y=0. Through database query, I found that the data returned by f_lrdl_4490(1, 1, 0) is indeed 12MB. Can martin-cp only generate the first level for custom functions?