קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אחרי שיוצרים מסלול, ה-API לבחירת כבישים מבצע תהליך אימות. האימות הזה מבטיח שהמסלול מתאים לאיסוף נתונים ולעדכונים בתוך התכונה 'תובנות לניהול כבישים'. בדרך כלל התהליך מסתיים תוך כמה דקות.
אפשר לעקוב אחרי סטטוס האימות של המסלולים באמצעות השדה state בתגובת ה-API. אפשר לבדוק את זה באמצעות נקודת הקצה get, כמו שמתואר במאמר קבלת מסלולים נבחרים, או על ידי בדיקת הטבלה routes_status ב-BigQuery.
מצבי מסלול
השדה state במשאב SelectedRoute מציין את הסטטוס הנוכחי של האימות והתפעול שלו. השדה state יכול לקבל את הערכים הבאים:
STATE_UNSPECIFIED: מצב האימות של המסלול הזה לא מוגדר.
STATE_VALIDATING: המסלול נמצא בתהליך אימות.
STATE_RUNNING: המסלול עבר את האימות בהצלחה והוא פעיל עכשיו. ממשק ה-API אוסף נתונים באופן פעיל ושולח עדכונים תקופתיים לגבי המסלול הזה אל BigQuery, אל Pub/Sub או אל שניהם.
STATE_DELETING: המסלול סומן למחיקה והוא מוסר מהמערכת.
STATE_INVALID: המסלול לא עבר אימות על סמך קריטריונים ספציפיים.
כשמסלול נמצא במצב STATE_INVALID, התשובה כוללת את השדה validationError עם פרטים על הסיבה לכשל באימות.
שגיאות אימות
כשהערך של state במשאב SelectedRoute הוא STATE_INVALID, תגובת ה-API כוללת את השדה validationError. בשדה הזה מצוין הסבר ספציפי לכשל באימות.
VALIDATION_ERROR_UNSPECIFIED: שגיאת האימות של המסלול הזה לא מוגדרת.
VALIDATION_ERROR_ROUTE_OUTSIDE_JURISDICTION: המסלול נמצא מחוץ לתחום השיפוט המורשה של הפרויקט.
VALIDATION_ERROR_LOW_ROAD_USAGE: המסלול לא נמצא בשימוש רב, כלומר אי אפשר לאסוף מספיק נתוני תנועה כדי לבצע ניתוח משמעותי. מסלול שסווג כלא תקין בגלל שימוש נמוך בכביש עשוי להיות תקין שוב אם נפח התנועה יעלה מעל סף שנקבע מראש. מידע נוסף זמין במאמר מסלול עם שימוש מועט בכבישים.
מסלול עם שימוש נמוך בכבישים
יכול להיות שתווית VALIDATION_ERROR_LOW_ROAD_USAGE תופיע לצד מסלולים אם ה-API יקבע שאין מספיק נתונים על תנועת הגולשים כדי לבצע ניתוח עקבי. זה יכול לקרות במהלך האימות הראשוני או במהלך הערכות שוטפות.
כך זה עובד במסלולים עם שימוש נמוך בכבישים:
הפרסום של נתונים ב-BigQuery נמשך: גם אם מסלול מסוים מסווג כSTATE_INVALID בגלל שימוש נמוך בכביש, ה-API ממשיך לעבד ולפרסם ב-BigQuery את כל הנתונים שזמינים לגבי המסלול הזה.
העדכונים של Pub/Sub מפסיקים: אם הערך של state במסלול משתנה ל-STATE_INVALID, העדכונים התקופתיים בזמן אמת של Pub/Sub מפסיקים.
הערכות רבעוניות: ה-API מבצע הערכות רבעוניות של כל המסלולים הפעילים כדי לבדוק את נפח התנועה.
אם המערכת מזהה נפח תנועה נמוך במהלך ההערכה, ה-API מציג אזהרה במשאב SelectedRoute.
אם נפח התנועה הנמוך נמשך במשך ארבעה רבעונים רצופים, הערך של המסלול state משתנה ל-STATE_INVALID, והעדכונים של Pub/Sub מפסיקים.
אפשר לבצע אימות מחדש: גם אם מסלול מסוים הוא STATE_INVALID, הוא עדיין נתון לבדיקות תנועה שוטפות. יכול להיות שבבדיקות הבאות המסלול יסווג מחדש כחוקי (STATE_RUNNING) אם נפח התנועה בו יעלה מעל סף שנקבע מראש.
מעקב אחרי הסטטוס: אפשר לעקוב אחרי סטטוס האימות של מסלול דרך נקודת הקצה get, כמו שמתואר במאמר קבלת מסלולים נבחרים, או על ידי בדיקת הטבלה routes_status ב-BigQuery.
פתרון בעיות שקשורות לנתיבים לא תקינים
אם המסלול state הוא STATE_INVALID, פועלים לפי ההנחיות הבאות לפתרון בעיות בהתאם לvalidationError שקיבלתם:
VALIDATION_ERROR_ROUTE_OUTSIDE_JURISDICTION: השגיאה הזו מציינת שהמסלול שהוגדר חורג מהאזור הגיאוגרפי שאושר לפרויקט שלכם. כדי לפתור את הבעיה, צריך למחוק את המסלול הקיים וליצור אותו מחדש, ולוודא שכל הנקודות שלו (נקודת המוצא, היעד וכל נקודות הביניים) נמצאות בתחום השיפוט של הפרויקט המורשה.
VALIDATION_ERROR_LOW_ROAD_USAGE: השגיאה הזו מציינת שבמסלול שנבחר אין מספיק נתונים על השימוש בדרכים כדי לבצע ניתוח משמעותי ועדכונים. כדי לפתור את הבעיה, צריך למחוק את המסלול הקיים וליצור אותו מחדש, ולבחור אזור עם שימוש גבוה יותר בכבישים או עם עומס תנועה גבוה יותר לאיסוף הנתונים. שימו לב: אם המסלול שלכם כולל את השגיאה הזו, הסטטוס של המסלול יכול לחזור ל-STATE_RUNNING אם נפח התנועה גדל לאורך זמן, כפי שמתואר במאמר בנושא מסלול עם שימוש נמוך.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-09-04 (שעון UTC)."],[],[],null,["# Understand route validation\n\nAfter you create a route, the Roads Selection API performs a validation process. This\nvalidation ensures that the route is suitable for data collection and updates\nwithin Roads Management Insights. The process typically completes within a few minutes.\n\nYou can monitor the validation status of your routes through the [`state`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#state)\nfield in the API response. You can check this by using the [`get`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes/get) endpoint, as\ndescribed in [Get Selected Routes](/maps/documentation/roads-management-insights/select-routes-api/get), or by examining the `routes_status`\ntable in BigQuery.\n\nRoute states\n------------\n\nThe [`state`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#state) field in a [`SelectedRoute`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#SelectedRoute) resource indicates its current\nvalidation and operational status. The [`state`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#state) field can have the following\nvalues:\n\n- `STATE_UNSPECIFIED`: The validation state of this route is not set.\n- `STATE_VALIDATING`: The route is being validated.\n- `STATE_RUNNING`: The route has successfully passed validation and is now active. The API is actively collecting data and sending periodic updates for this route to BigQuery, Pub/Sub, or both.\n- `STATE_DELETING`: The route has been marked for deletion and is being removed from the system.\n- `STATE_INVALID`: The route failed validation based on specific criteria. When a route is in `STATE_INVALID`, the response includes a [`validationError`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#validationerror) field with details on why the validation failed.\n\nValidation errors\n-----------------\n\nWhen a [`SelectedRoute`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#SelectedRoute) resource's [`state`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#state) is `STATE_INVALID`, the API\nresponse includes a [`validationError`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#validationerror) field. This field provides a specific\nreason for the validation failure.\n\nThe [`validationError`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#validationerror) field can have the following values:\n\n- `VALIDATION_ERROR_UNSPECIFIED`: The validation error for this route is not set.\n- `VALIDATION_ERROR_ROUTE_OUTSIDE_JURISDICTION`: The route is outside the authorized jurisdiction of your project.\n- `VALIDATION_ERROR_LOW_ROAD_USAGE`: The route has low road usage, meaning insufficient traffic data can be collected for meaningful analysis. A route classified as invalid due to low road usage may become valid again if traffic volume increases above a predetermined threshold. Learn more in [Low\n road usage route](#low).\n\nLow road usage route\n--------------------\n\nRoutes might be flagged with `VALIDATION_ERROR_LOW_ROAD_USAGE` if the API\ndetermines there isn't enough traffic data for consistent analysis. This can\nhappen during initial validation or during ongoing evaluations.\n\nHere's what to expect for routes with low road usage:\n\n- **Data publication to BigQuery continues:** Even if a route is classified as `STATE_INVALID` due to low road usage, the API continues to process and publish any available data for that route to BigQuery.\n- **Pub/Sub updates stop:** Periodic real-time updates to Pub/Sub cease if the route's [`state`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#state) changes to `STATE_INVALID`.\n- **Quarterly evaluations:** The API performs quarterly evaluations of all active routes for traffic volume.\n - If low traffic is detected during an evaluation, the API issues a warning within the [`SelectedRoute`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#SelectedRoute) resource.\n - If low traffic persists for four consecutive quarters, the route's [`state`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#state) changes to `STATE_INVALID`, and Pub/Sub updates stop.\n- **Revalidation is possible:** Even if a route is `STATE_INVALID`, it remains subject to ongoing traffic evaluations. Subsequent evaluations may reclassify the route as valid (`STATE_RUNNING`) if its traffic volume increases above a predetermined threshold.\n- **Monitoring status:** You can monitor a route's validation status through the [`get`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes/get) endpoint, as described in [Get Selected Routes](/maps/documentation/roads-management-insights/select-routes-api/get), or by examining the `routes_status` table in BigQuery.\n\nTroubleshooting invalid routes\n------------------------------\n\nIf your route [`state`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#state) is `STATE_INVALID`, follow the next troubleshooting\nguidelines based on the [`validationError`](/maps/documentation/roads-management-insights/reference/rest/v1/selection.v1.projects.selectedRoutes#validationerror) you receive:\n\n- **`VALIDATION_ERROR_ROUTE_OUTSIDE_JURISDICTION`**: This error indicates that\n the defined route extends beyond the geographic area authorized for your\n project. To fix this, delete the existing route and re-create the\n route, ensuring all its points (origin, destination, and any intermediates)\n are within your authorized project's jurisdiction.\n\n- **`VALIDATION_ERROR_LOW_ROAD_USAGE`** : This error means the selected route\n does not have sufficient road usage data for meaningful analysis and\n updates. To fix this, delete the existing route and re-create the\n route, selecting an area with higher road usage or \"busyness\" for data\n collection. Note that if your route has this error, the route's status can\n change back to STATE_RUNNING if traffic increases over time as described in\n [Low road usage route](#low)."]]