diff --git a/test/integration/expression-tests/within/meridian-issue-line/test.json b/test/integration/expression-tests/within/meridian-issue-line-1/test.json similarity index 100% rename from test/integration/expression-tests/within/meridian-issue-line/test.json rename to test/integration/expression-tests/within/meridian-issue-line-1/test.json diff --git a/test/integration/expression-tests/within/meridian-issue-line-2/test.json b/test/integration/expression-tests/within/meridian-issue-line-2/test.json new file mode 100644 index 00000000000..0e73e0b7e20 --- /dev/null +++ b/test/integration/expression-tests/within/meridian-issue-line-2/test.json @@ -0,0 +1,56 @@ +{ + "expression": ["within", { + "type": "Polygon", + "coordinates": [[[-185.0, 60.0], [175.0, 60.0], [175.0, 65.0], [-185.0, 65.0], [-185.0, 60.0]]] + }], + "inputs": [[{ + "zoom": 0, + "canonicalID": { + "z": 0, + "x": 0, + "y": 0 + } + }, { + "geometry": { + "type": "LineString", + "coordinates": [[-183, 61], [-179, 62]] + } + }], [{ + "zoom": 0, + "canonicalID": { + "z": 0, + "x": 0, + "y": 0 + } + }, { + "geometry": { + "type": "LineString", + "coordinates": [[-183, 61], [181, 63]] + } + }], [{ + "zoom": 0, + "canonicalID": { + "z": 0, + "x": 0, + "y": 0 + } + }, { + "geometry": { + "type": "LineString", + "coordinates": [[-183, 62], [55, 63.5]] + } + }]], + "expected": { + "compiled": { + "type": "boolean", + "isFeatureConstant": false, + "isZoomConstant": true, + "result": "success" + }, + "outputs": [true, false, true], + "serialized": ["within", { + "coordinates": [[[-185.0, 60.0], [175.0, 60.0], [175.0, 65.0], [-185.0, 65.0], [-185.0, 60.0]]], + "type": "Polygon" + }] + } +} diff --git a/test/integration/expression-tests/within/meridian-issue-point/test.json b/test/integration/expression-tests/within/meridian-issue-point-1/test.json similarity index 100% rename from test/integration/expression-tests/within/meridian-issue-point/test.json rename to test/integration/expression-tests/within/meridian-issue-point-1/test.json diff --git a/test/integration/expression-tests/within/meridian-issue-point-2/test.json b/test/integration/expression-tests/within/meridian-issue-point-2/test.json new file mode 100644 index 00000000000..0a7a524f847 --- /dev/null +++ b/test/integration/expression-tests/within/meridian-issue-point-2/test.json @@ -0,0 +1,68 @@ +{ + "expression": ["within", { + "type": "Polygon", + "coordinates": [[[-360.0, 60.0], [0.0, 60.0], [0.0, 65.0], [-360.0, 65.0], [-360.0, 60.0]]] + }], + "inputs": [[{ + "zoom": 0, + "canonicalID": { + "z": 0, + "x": 0, + "y": 0 + } + }, { + "geometry": { + "type": "Point", + "coordinates": [-183, 61] + } + }], [{ + "zoom": 0, + "canonicalID": { + "z": 0, + "x": 0, + "y": 0 + } + }, { + "geometry": { + "type": "Point", + "coordinates": [-361, 61] + } + }], [{ + "zoom": 0, + "canonicalID": { + "z": 0, + "x": 0, + "y": 0 + } + }, { + "geometry": { + "type": "Point", + "coordinates": [183, 62] + } + }], [{ + "zoom": 0, + "canonicalID": { + "z": 0, + "x": 0, + "y": 0 + } + }, { + "geometry": { + "type": "Point", + "coordinates": [55, 62] + } + }]], + "expected": { + "compiled": { + "type": "boolean", + "isFeatureConstant": false, + "isZoomConstant": true, + "result": "success" + }, + "outputs": [true, true, true, true], + "serialized": ["within", { + "coordinates": [[[-360.0, 60.0], [0.0, 60.0], [0.0, 65.0], [-360.0, 65.0], [-360.0, 60.0]]], + "type": "Polygon" + }] + } +}