{"record":{"id":"a90a3a382d3672e9","repo":"babalae/better-genshin-impact","slug":"error-a90a3a","errorCode":null,"errorMessage":"大地图特征点匹配识别位置失败","messagePattern":"大地图特征点匹配识别位置失败","errorType":"exception","errorClass":"MapPositionNotRecognizedException","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs","lineNumber":2143,"sourceCode":"    }\n\n    public Point2f GetBigMapCenterPoint(string mapName)\n    {\n        return GetBigMapCenterPoint(mapName, null);\n    }\n\n    private Point2f GetBigMapCenterPoint(string mapName, Point2f? expectedCenterPoint)\n    {\n        // 判断是否在地图界面\n        using var ra = CaptureToRectArea();\n        using var mapScaleButtonRa = ra.Find(GetQuickTeleportRecognitionObject(\"MapScaleButton\", ra));\n        if (mapScaleButtonRa.IsExist())\n        {\n            var p = RecognizeBigMapCenterPoint(mapName, ra.CacheGreyMat, expectedCenterPoint);\n\n            if (p.IsEmpty())\n            {\n                throw new MapPositionNotRecognizedException(\"大地图特征点匹配识别位置失败\");\n            }\n\n            return p;\n        }\n        else\n        {\n            throw new InvalidOperationException(\"当前不在地图界面\");\n        }\n    }\n\n    private Point2f RecognizeBigMapCenterPoint(string mapName, Mat greyMat, Point2f? expectedCenterPoint = null)\n    {\n        Point2f p;\n        try\n        {\n            var map = MapManager.GetMap(mapName, _mapMatchingMethod);\n            p = expectedCenterPoint is Point2f expectedCenter\n                ? map.GetBigMapPosition(greyMat, map.ConvertGenshinMapCoordinatesToImageCoordinates(expectedCenter))","sourceCodeStart":2125,"sourceCodeEnd":2161,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs#L2125-L2161","documentation":"Thrown by GetBigMapCenterPoint(private overload) when RecognizeBigMapCenterPoint returns an empty Point2f (IsEmpty() true). The MapScaleButton was found (confirming the map interface is open), but the underlying feature-point matching (GetBigMapPosition) could not locate the current map center position.","triggerScenarios":"Called from GetBigMapCenterPoint(mapName, expectedCenterPoint). The MapScaleButton exists, so we are on the map. But RecognizeBigMapCenterPoint → map.GetBigMapPosition returns an empty point, indicating no feature match.","commonSituations":"The current map view is over a low-feature area (open water, featureless terrain); map matching assets are outdated; the expectedCenterPoint hint is inaccurate causing the search to look in the wrong area; capture quality issues (blur, compression).","solutions":["Update map feature-point assets to match the current game version.","Provide an accurate expectedCenterPoint to narrow the search area.","Pan the map to a more feature-rich area before calling.","Switch _mapMatchingMethod to a more robust algorithm if multiple are available.","Retry after ensuring the map is fully rendered (no loading animation)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    var center = task.GetBigMapCenterPoint(mapName, expectedCenter);\n}\ncatch (MapPositionNotRecognizedException ex) when (ex.Message == \"大地图特征点匹配识别位置失败\")\n{\n    // Pan to a feature-rich area or provide a more accurate expectedCenter\n    throw;\n}","preventionTips":["Provide an accurate expectedCenterPoint to constrain feature matching.","Keep map feature assets updated with the current game version.","Avoid calling on low-feature map areas (open water, uniform terrain).","Ensure the map is fully rendered with no loading overlays."],"tags":["map-navigation","feature-matching","center-point","recognition"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}