Skip to content

Commit 13f84fc

Browse files
committed
adapt unit-tests to new tile-buffer
1 parent 629391c commit 13f84fc

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

test/fixtures/simple_z13.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SELECT ( (SELECT ST_AsMVT(q, 'landuse', 4096, 'geom') AS l FROM
33
geometry,
44
ST_Transform(ST_MakeEnvelope(!BBOX!, 4326), 3857),
55
4096,
6-
256,
6+
64,
77
true
88
) AS geom
99
FROM import.landuse_gen8 WHERE (geometry && ST_Transform(ST_MakeEnvelope(!BBOX!, 4326), 3857))) AS q) ) AS mvt

test/queries.test.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("buildLayerQuery", function () {
2828
geometry,
2929
ST_Transform(ST_MakeEnvelope(${bbox.leftbottom.lng}, ${bbox.leftbottom.lat}, ${bbox.righttop.lng}, ${bbox.righttop.lat}, 4326), 3857),
3030
4096,
31-
256,
31+
64,
3232
true
3333
) AS geom
3434
FROM table1 WHERE (geometry && ST_Transform(ST_MakeEnvelope(${bbox.leftbottom.lng}, ${bbox.leftbottom.lat}, ${bbox.righttop.lng}, ${bbox.righttop.lat}, 4326), 3857))) AS q)`.replace(/\s+/g, ' '));
@@ -52,7 +52,7 @@ describe("buildLayerQuery", function () {
5252
geometry,
5353
ST_Transform(ST_MakeEnvelope(${bbox.leftbottom.lng}, ${bbox.leftbottom.lat}, ${bbox.righttop.lng}, ${bbox.righttop.lat}, 4326), 3857),
5454
4096,
55-
256,
55+
64,
5656
true
5757
) AS geom
5858
FROM table1 WHERE (geometry && ST_Transform(ST_MakeEnvelope(${bbox.leftbottom.lng}, ${bbox.leftbottom.lat}, ${bbox.righttop.lng}, ${bbox.righttop.lat}, 4326), 3857))) AS q)`.replace(/\s+/g, ' '));
@@ -67,7 +67,7 @@ describe("buildLayerQuery", function () {
6767
name: "layer1",
6868
table: "table1",
6969
extend: 4096,
70-
buffer: 64,
70+
buffer: 256,
7171
clip_geom: false,
7272
geom: "geometry",
7373
srid: 3857,
@@ -84,7 +84,7 @@ describe("buildLayerQuery", function () {
8484
geometry,
8585
ST_Transform(ST_MakeEnvelope(${bbox.leftbottom.lng}, ${bbox.leftbottom.lat}, ${bbox.righttop.lng}, ${bbox.righttop.lat}, 4326), 3857),
8686
4096,
87-
64,
87+
256,
8888
false
8989
) AS geom, osm_id as id, name
9090
FROM table1 WHERE (geometry && ST_Transform(ST_MakeEnvelope(${bbox.leftbottom.lng}, ${bbox.leftbottom.lat}, ${bbox.righttop.lng}, ${bbox.righttop.lat}, 4326), 3857)) AND (TRUE)ORDER BY id) AS q)`.replace(/\s+/g, ' '));
@@ -99,7 +99,7 @@ describe("buildLayerQuery", function () {
9999
name: "layer1",
100100
table: "table1",
101101
extend: 4096,
102-
buffer: 64,
102+
buffer: 256,
103103
clip_geom: false,
104104
geom: "geometry",
105105
srid: 3857,
@@ -137,7 +137,7 @@ describe("buildLayerQuery", function () {
137137
name: "source",
138138
geom: "geometry",
139139
extend: 4096,
140-
buffer: 64,
140+
buffer: 256,
141141
clip_geom: false,
142142
srid: 3857,
143143
keys: ["osm_id as id", "name"],
@@ -158,7 +158,7 @@ describe("buildLayerQuery", function () {
158158
geometry,
159159
ST_Transform(ST_MakeEnvelope(${bbox.leftbottom.lng}, ${bbox.leftbottom.lat}, ${bbox.righttop.lng}, ${bbox.righttop.lat}, 4326), 3857),
160160
4096,
161-
64,
161+
256,
162162
false
163163
) AS geom, osm_id as id, name
164164
FROM table1 WHERE (geometry && ST_Transform(ST_MakeEnvelope(${bbox.leftbottom.lng}, ${bbox.leftbottom.lat}, ${bbox.righttop.lng}, ${bbox.righttop.lat}, 4326), 3857)) AND (TRUE)ORDER BY id) AS q)`.replace(/\s+/g, ' '));
@@ -223,7 +223,7 @@ describe("buildLayerQuery", function () {
223223
geometry,
224224
ST_Transform(ST_MakeEnvelope(${bbox.leftbottom.lng}, ${bbox.leftbottom.lat}, ${bbox.righttop.lng}, ${bbox.righttop.lat}, 4326), 3857),
225225
4096,
226-
256,
226+
64,
227227
true
228228
) AS geom, 13 as zoom, '13' as name
229229
FROM table1 WHERE (geometry && ST_Transform(ST_MakeEnvelope(${bbox.leftbottom.lng}, ${bbox.leftbottom.lat}, ${bbox.righttop.lng}, ${bbox.righttop.lat}, 4326), 3857))

0 commit comments

Comments
 (0)