{"abstract":"512-pixel tile pyramids report four times the true metres per pixel.","category":"Map projection transforms","checks":8,"contract":"Input [lat, z, tile_size, dpi]. Ground resolution in metres per pixel is 2*pi*6378137*cos(lat)/(tile_size*2**z) with the equatorial circumference computed exactly. The map scale denominator is resolution*dpi/0.0254. Return [resolution rounded to 6 decimals, scale denominator rounded to the nearest integer] computed from the unrounded resolution.","evaluation_group":"w2-map-projection-transforms-ground-resolution-scale","failed_approach":"The tile size is ignored altogether, fixing 256-pixel pyramids only.","family":"w2-map-projection-transforms-ground-resolution-scale-tile-size-scaling","id":"FA-69971","implementations":{"attempt":{"sha256":"ae200c4ec3bc134c8fe28c77103a4fedbc6d3c28da22bb48703ee6a388bf1bef","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    lat, z, tile, dpi = x\n    circumference = 2 * math.pi * 6378137.0\n    res = circumference * math.cos(math.radians(lat)) / (256 * 2 ** z)\n    scale = res * dpi / 0.0254\n    return [round(res, 6), round(scale)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [-0.88, 17, 256, 72], [1.194188, 3385]), ('control #1', [-33.07, 0, 512, 72], [65591.886576, 185929757]), ('control #2', [-22.5, 12, 512, 72], [17.654651, 50045]), ('control #3', [75.86, 10, 256, 300], [37.345917, 441094]), ('control #4', [30.21, 20, 256, 72], [0.129015, 366]), ('control #5', [-75.78, 4, 256, 300], [2403.383393, 28386418]), ('control #6', [-15.49, 9, 512, 72], [147.321225, 417603]), ('control #7', [76.6, 19, 512, 300], [0.034598, 409])], [('control #2', [-22.5, 12, 512, 72], [17.654651, 50045]), ('control #4', [30.21, 20, 256, 72], [0.129015, 366]), ('control #5', [-75.78, 4, 256, 300], [2403.383393, 28386418]), ('control #6', [-15.49, 9, 512, 72], [147.321225, 417603]), ('control #7', [76.6, 19, 512, 300], [0.034598, 409]), ('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #9', [-14.77, 4, 256, 96], [9460.648974, 35756784]), ('control #10', [6.58, 15, 256, 300], [4.745845, 56053])], [('control #6', [-15.49, 9, 512, 72], [147.321225, 417603]), ('control #7', [76.6, 19, 512, 300], [0.034598, 409]), ('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #9', [-14.77, 4, 256, 96], [9460.648974, 35756784]), ('control #10', [6.58, 15, 256, 300], [4.745845, 56053]), ('control #11', [-18.37, 9, 256, 72], [290.167542, 822522]), ('control #12', [-51.53, 14, 512, 300], [2.97199, 35102]), ('control #13', [-69.8, 6, 256, 300], [844.594183, 9975522])], [('control #7', [76.6, 19, 512, 300], [0.034598, 409]), ('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #11', [-18.37, 9, 256, 72], [290.167542, 822522]), ('control #12', [-51.53, 14, 512, 300], [2.97199, 35102]), ('control #13', [-69.8, 6, 256, 300], [844.594183, 9975522]), ('control #14', [-23.41, 10, 256, 72], [140.290274, 397673]), ('control #15', [-37.12, 12, 256, 96], [30.474424, 115179]), ('boundary #16', [0.0, 0, 256, 96], [156543.033928, 591658711])], [('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #12', [-51.53, 14, 512, 300], [2.97199, 35102]), ('control #14', [-23.41, 10, 256, 72], [140.290274, 397673]), ('control #15', [-37.12, 12, 256, 96], [30.474424, 115179]), ('boundary #16', [0.0, 0, 256, 96], [156543.033928, 591658711]), ('boundary #17', [60.0, 1, 512, 96], [19567.879241, 73957339]), ('regression #18', [45.0, 10, 512, 90.7], [54.049141, 193002]), ('boundary #19', [-60.0, 3, 256, 300], [9783.939621, 115558342])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"a58eea0fb3c22f3d5aaee02c569c1b0f5cf7003044a13b9e8006f27ce88a8383","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    lat, z, tile, dpi = x\n    circumference = 2 * math.pi * 6378137.0\n    res = circumference * math.cos(math.radians(lat)) / (256 * 2 ** z / (tile / 256))\n    scale = res * dpi / 0.0254\n    return [round(res, 6), round(scale)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [-0.88, 17, 256, 72], [1.194188, 3385]), ('control #1', [-33.07, 0, 512, 72], [65591.886576, 185929757]), ('control #2', [-22.5, 12, 512, 72], [17.654651, 50045]), ('control #3', [75.86, 10, 256, 300], [37.345917, 441094]), ('control #4', [30.21, 20, 256, 72], [0.129015, 366]), ('control #5', [-75.78, 4, 256, 300], [2403.383393, 28386418]), ('control #6', [-15.49, 9, 512, 72], [147.321225, 417603]), ('control #7', [76.6, 19, 512, 300], [0.034598, 409])], [('control #2', [-22.5, 12, 512, 72], [17.654651, 50045]), ('control #4', [30.21, 20, 256, 72], [0.129015, 366]), ('control #5', [-75.78, 4, 256, 300], [2403.383393, 28386418]), ('control #6', [-15.49, 9, 512, 72], [147.321225, 417603]), ('control #7', [76.6, 19, 512, 300], [0.034598, 409]), ('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #9', [-14.77, 4, 256, 96], [9460.648974, 35756784]), ('control #10', [6.58, 15, 256, 300], [4.745845, 56053])], [('control #6', [-15.49, 9, 512, 72], [147.321225, 417603]), ('control #7', [76.6, 19, 512, 300], [0.034598, 409]), ('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #9', [-14.77, 4, 256, 96], [9460.648974, 35756784]), ('control #10', [6.58, 15, 256, 300], [4.745845, 56053]), ('control #11', [-18.37, 9, 256, 72], [290.167542, 822522]), ('control #12', [-51.53, 14, 512, 300], [2.97199, 35102]), ('control #13', [-69.8, 6, 256, 300], [844.594183, 9975522])], [('control #7', [76.6, 19, 512, 300], [0.034598, 409]), ('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #11', [-18.37, 9, 256, 72], [290.167542, 822522]), ('control #12', [-51.53, 14, 512, 300], [2.97199, 35102]), ('control #13', [-69.8, 6, 256, 300], [844.594183, 9975522]), ('control #14', [-23.41, 10, 256, 72], [140.290274, 397673]), ('control #15', [-37.12, 12, 256, 96], [30.474424, 115179]), ('boundary #16', [0.0, 0, 256, 96], [156543.033928, 591658711])], [('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #12', [-51.53, 14, 512, 300], [2.97199, 35102]), ('control #14', [-23.41, 10, 256, 72], [140.290274, 397673]), ('control #15', [-37.12, 12, 256, 96], [30.474424, 115179]), ('boundary #16', [0.0, 0, 256, 96], [156543.033928, 591658711]), ('boundary #17', [60.0, 1, 512, 96], [19567.879241, 73957339]), ('regression #18', [45.0, 10, 512, 90.7], [54.049141, 193002]), ('boundary #19', [-60.0, 3, 256, 300], [9783.939621, 115558342])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"a076b0705a91f43c183b8ade39558afe882156b9aa6b4583753112f672db7134","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    lat, z, tile, dpi = x\n    circumference = 2 * math.pi * 6378137.0\n    res = circumference * math.cos(math.radians(lat)) / (tile * 2 ** z)\n    scale = res * dpi / 0.0254\n    return [round(res, 6), round(scale)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [-0.88, 17, 256, 72], [1.194188, 3385]), ('control #1', [-33.07, 0, 512, 72], [65591.886576, 185929757]), ('control #2', [-22.5, 12, 512, 72], [17.654651, 50045]), ('control #3', [75.86, 10, 256, 300], [37.345917, 441094]), ('control #4', [30.21, 20, 256, 72], [0.129015, 366]), ('control #5', [-75.78, 4, 256, 300], [2403.383393, 28386418]), ('control #6', [-15.49, 9, 512, 72], [147.321225, 417603]), ('control #7', [76.6, 19, 512, 300], [0.034598, 409])], [('control #2', [-22.5, 12, 512, 72], [17.654651, 50045]), ('control #4', [30.21, 20, 256, 72], [0.129015, 366]), ('control #5', [-75.78, 4, 256, 300], [2403.383393, 28386418]), ('control #6', [-15.49, 9, 512, 72], [147.321225, 417603]), ('control #7', [76.6, 19, 512, 300], [0.034598, 409]), ('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #9', [-14.77, 4, 256, 96], [9460.648974, 35756784]), ('control #10', [6.58, 15, 256, 300], [4.745845, 56053])], [('control #6', [-15.49, 9, 512, 72], [147.321225, 417603]), ('control #7', [76.6, 19, 512, 300], [0.034598, 409]), ('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #9', [-14.77, 4, 256, 96], [9460.648974, 35756784]), ('control #10', [6.58, 15, 256, 300], [4.745845, 56053]), ('control #11', [-18.37, 9, 256, 72], [290.167542, 822522]), ('control #12', [-51.53, 14, 512, 300], [2.97199, 35102]), ('control #13', [-69.8, 6, 256, 300], [844.594183, 9975522])], [('control #7', [76.6, 19, 512, 300], [0.034598, 409]), ('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #11', [-18.37, 9, 256, 72], [290.167542, 822522]), ('control #12', [-51.53, 14, 512, 300], [2.97199, 35102]), ('control #13', [-69.8, 6, 256, 300], [844.594183, 9975522]), ('control #14', [-23.41, 10, 256, 72], [140.290274, 397673]), ('control #15', [-37.12, 12, 256, 96], [30.474424, 115179]), ('boundary #16', [0.0, 0, 256, 96], [156543.033928, 591658711])], [('control #8', [20.0, 19, 512, 72], [0.140288, 398]), ('control #12', [-51.53, 14, 512, 300], [2.97199, 35102]), ('control #14', [-23.41, 10, 256, 72], [140.290274, 397673]), ('control #15', [-37.12, 12, 256, 96], [30.474424, 115179]), ('boundary #16', [0.0, 0, 256, 96], [156543.033928, 591658711]), ('boundary #17', [60.0, 1, 512, 96], [19567.879241, 73957339]), ('regression #18', [45.0, 10, 512, 90.7], [54.049141, 193002]), ('boundary #19', [-60.0, 3, 256, 300], [9783.939621, 115558342])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Stipulated deterministic toy contract on a bounded input domain; results are rounded as stated and no conformance with any published standard or library is claimed. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-map-projection-transforms-ground-resolution-scale-tile-size-scaling","generated_at":"2026-09-29T14:48:16.407957+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Scale bars, level-of-detail choice and print exports depend on these values.","repair":"At the tile size scaling step restore `(tile * 2 ** z)`, leaving the rest of the model unchanged.","root_cause":"Tile size is applied inversely, so larger tiles make pixels coarser rather than finer.","sha256":"bc94db06601e6ea94282e1eab2d52344ad87cacdcd84632f04060814778667a5","title":"Web mercator ground resolution and scale denominator: tile size scaling · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.32,"exit_code":1,"observations":[{"actual":[1.194188,3385],"check":"control #0","expected":[1.194188,3385],"passed":true},{"actual":[131183.773152,371859514],"check":"control #1","expected":[65591.886576,185929757],"passed":false},{"actual":[35.309303,100089],"check":"control #2","expected":[17.654651,50045],"passed":false},{"actual":[37.345917,441094],"check":"control #3","expected":[37.345917,441094],"passed":true},{"actual":[0.129015,366],"check":"control #4","expected":[0.129015,366],"passed":true},{"actual":[2403.383393,28386418],"check":"control #5","expected":[2403.383393,28386418],"passed":true},{"actual":[294.642449,835207],"check":"control #6","expected":[147.321225,417603],"passed":false},{"actual":[0.069196,817],"check":"control #7","expected":[0.034598,409],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [1.194188, 3385], \"expected\": [1.194188, 3385], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [131183.773152, 371859514], \"expected\": [65591.886576, 185929757], \"passed\": false}, {\"check\": \"control #2\", \"actual\": [35.309303, 100089], \"expected\": [17.654651, 50045], \"passed\": false}, {\"check\": \"control #3\", \"actual\": [37.345917, 441094], \"expected\": [37.345917, 441094], \"passed\": true}, {\"check\": \"control #4\", \"actual\": [0.129015, 366], \"expected\": [0.129015, 366], \"passed\": true}, {\"check\": \"control #5\", \"actual\": [2403.383393, 28386418], \"expected\": [2403.383393, 28386418], \"passed\": true}, {\"check\": \"control #6\", \"actual\": [294.642449, 835207], \"expected\": [147.321225, 417603], \"passed\": false}, {\"check\": \"control #7\", \"actual\": [0.069196, 817], \"expected\": [0.034598, 409], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.996,"exit_code":1,"observations":[{"actual":[1.194188,3385],"check":"control #0","expected":[1.194188,3385],"passed":true},{"actual":[262367.546303,743719029],"check":"control #1","expected":[65591.886576,185929757],"passed":false},{"actual":[70.618606,200179],"check":"control #2","expected":[17.654651,50045],"passed":false},{"actual":[37.345917,441094],"check":"control #3","expected":[37.345917,441094],"passed":true},{"actual":[0.129015,366],"check":"control #4","expected":[0.129015,366],"passed":true},{"actual":[2403.383393,28386418],"check":"control #5","expected":[2403.383393,28386418],"passed":true},{"actual":[589.284898,1670414],"check":"control #6","expected":[147.321225,417603],"passed":false},{"actual":[0.138392,1635],"check":"control #7","expected":[0.034598,409],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [1.194188, 3385], \"expected\": [1.194188, 3385], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [262367.546303, 743719029], \"expected\": [65591.886576, 185929757], \"passed\": false}, {\"check\": \"control #2\", \"actual\": [70.618606, 200179], \"expected\": [17.654651, 50045], \"passed\": false}, {\"check\": \"control #3\", \"actual\": [37.345917, 441094], \"expected\": [37.345917, 441094], \"passed\": true}, {\"check\": \"control #4\", \"actual\": [0.129015, 366], \"expected\": [0.129015, 366], \"passed\": true}, {\"check\": \"control #5\", \"actual\": [2403.383393, 28386418], \"expected\": [2403.383393, 28386418], \"passed\": true}, {\"check\": \"control #6\", \"actual\": [589.284898, 1670414], \"expected\": [147.321225, 417603], \"passed\": false}, {\"check\": \"control #7\", \"actual\": [0.138392, 1635], \"expected\": [0.034598, 409], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.708,"exit_code":0,"observations":[{"actual":[1.194188,3385],"check":"control #0","expected":[1.194188,3385],"passed":true},{"actual":[65591.886576,185929757],"check":"control #1","expected":[65591.886576,185929757],"passed":true},{"actual":[17.654651,50045],"check":"control #2","expected":[17.654651,50045],"passed":true},{"actual":[37.345917,441094],"check":"control #3","expected":[37.345917,441094],"passed":true},{"actual":[0.129015,366],"check":"control #4","expected":[0.129015,366],"passed":true},{"actual":[2403.383393,28386418],"check":"control #5","expected":[2403.383393,28386418],"passed":true},{"actual":[147.321225,417603],"check":"control #6","expected":[147.321225,417603],"passed":true},{"actual":[0.034598,409],"check":"control #7","expected":[0.034598,409],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [1.194188, 3385], \"expected\": [1.194188, 3385], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [65591.886576, 185929757], \"expected\": [65591.886576, 185929757], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [17.654651, 50045], \"expected\": [17.654651, 50045], \"passed\": true}, {\"check\": \"control #3\", \"actual\": [37.345917, 441094], \"expected\": [37.345917, 441094], \"passed\": true}, {\"check\": \"control #4\", \"actual\": [0.129015, 366], \"expected\": [0.129015, 366], \"passed\": true}, {\"check\": \"control #5\", \"actual\": [2403.383393, 28386418], \"expected\": [2403.383393, 28386418], \"passed\": true}, {\"check\": \"control #6\", \"actual\": [147.321225, 417603], \"expected\": [147.321225, 417603], \"passed\": true}, {\"check\": \"control #7\", \"actual\": [0.034598, 409], \"expected\": [0.034598, 409], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}