محطة حسب معرّف OSM
معلومة مهمة. نسخة مؤرخة من OpenStreetMap برخصة ODbL. الأسماء والمدن الغائبة بقيمة null. تشمل مواقع غير مستعملة أو مخططاً لها؛ خدمة المسافرين والربط الحالي غير مؤكدين.
فهم الإجابة
data: النتائج المطلوبة، في كائن أو قائمة.
meta: مصادر البيانات ورخصتها وتواريخها. تعني null أن القيمة غير معروفة أو غير متاحة.
API v2 هو المسار المرجعي. تبقى مسارات /api/v1 القديمة أسماء بديلة متوافقة مع السلوك المنشور حالياً، بما فيه تقسيم الصفحات؛ لم يُحدد موعد لحذفها.
حقول الإجابة 27
تشير [] إلى كل عنصر في القائمة. تعني null غير معروف أو غير متاح، ولا تعني صفراً. لغة الدليل لا تترجم قيم المصادر.
dataobjectالنتيجة المطلوبة: كائن واحد أو قائمة.
data.idstringمعرّف عنصر OSM الرئيسي، وليس رمز ONCF أو UIC.
data.namestring | nullاسم المورد، وقد يكون موزّعاً حسب اللغة.
data.namesobjectالأسماء اللغوية المذكورة صراحة في OSM؛ دون ترجمة مولدة.
data.names.arstring | nullالقيمة بالعربية؛ null عند غياب الترجمة.
data.names.frstring | nullالقيمة بالفرنسية؛ null عند غياب الترجمة.
data.names.enstring | nullالقيمة بالإنجليزية؛ null عند غياب الترجمة.
data.aliasesstring[]أسماء أخرى للمورد نفسه تساعد في التعرّف عليه أو البحث عنه.
data.typestringstation: محطة؛ halt: موقف قطار صغير.
القيم المقبولة:
"station""halt"data.citystring | nullالمدينة المحددة عبر addr:city أو is_in:city في OSM؛ null عند غيابها.
data.operatorstring | nullالمشغّل المسجل في OSM دون تأكيد رسمي حالي.
data.networkstring | nullاسم الشبكة المسجل في OSM عند توفره.
data.locationobjectإحداثيات الموقع الواردة في المصدر، عند توفرها.
data.location.latitudenumberخط العرض وفق WGS 84 بالدرجات العشرية: موجب شمالاً وسالب جنوباً.
data.location.longitudenumberخط الطول وفق WGS 84 بالدرجات العشرية: موجب شرقاً وسالب غرباً.
data.location.methodstringosm_point: نقطة المصدر؛ bounding_box_center: مركز نطاق العنصر وليس مدخلاً.
القيم المقبولة:
"osm_point""bounding_box_center"data.osm_statusstringالحالة المذكورة صراحة في OSM؛ unknown لا تؤكد العمل.
القيم المقبولة:
"unknown""disused""abandoned""construction""proposed""demolished"data.wikidata_idstring | nullمعرّف Wikidata الموجود في OSM دون إضافة خارجية.
data.passenger_servicenullnull: خدمة المسافرين الحالية غير متحقق منها.
القيم المقبولة:
nulldata.connectionsnullnull: الربط غير متاح، وليس قائمة فارغة تثبت انعدامه.
القيم المقبولة:
nulldata.sourcesobject[]عناصر OSM التي توثق السجل؛ الأول يحدد معرّفه وموقعه.
data.sources[].osm_typestringنوع عنصر OpenStreetMap: node أو way أو relation.
القيم المقبولة:
"node""way""relation"data.sources[].osm_idintegerالمعرّف الرقمي لـOSM ويُستخدم مع osm_type.
data.sources[].versionintegerإصدار عنصر OSM في هذه النسخة.
data.sources[].updated_atstringآخر تعديل لعنصر OSM؛ ليس تحققاً ميدانياً.
data.sources[].urlstringرابط عنصر OSM؛ قد تكون نسخته على الإنترنت تغيّرت.
data.sources[].fieldsstring[]حقول السجل الموحد التي ساهم بها عنصر المصدر.
بنية البيانات
{
"type": "object",
"additionalProperties": false,
"required": [
"data",
"meta"
],
"properties": {
"data": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"name",
"names",
"aliases",
"type",
"city",
"operator",
"network",
"location",
"osm_status",
"wikidata_id",
"passenger_service",
"connections",
"sources"
],
"properties": {
"id": {
"type": "string",
"pattern": "^osm-(node|way|relation)-[1-9][0-9]*$"
},
"name": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"names": {
"type": "object",
"additionalProperties": false,
"required": [
"ar",
"fr",
"en"
],
"properties": {
"ar": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"fr": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"en": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
}
}
},
"aliases": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"type": {
"type": "string",
"enum": [
"station",
"halt"
]
},
"city": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Explicit OSM addr:city or is_in:city, not a geocoded administrative assignment."
},
"operator": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"network": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"location": {
"type": "object",
"additionalProperties": false,
"required": [
"latitude",
"longitude",
"method"
],
"properties": {
"latitude": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180
},
"method": {
"type": "string",
"enum": [
"osm_point",
"bounding_box_center"
]
}
}
},
"osm_status": {
"type": "string",
"enum": [
"unknown",
"disused",
"abandoned",
"construction",
"proposed",
"demolished"
],
"description": "Explicit source lifecycle only; unknown is not confirmation of current service."
},
"wikidata_id": {
"anyOf": [
{
"type": "string",
"pattern": "^Q[1-9][0-9]*$"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"passenger_service": {
"type": "string",
"description": "Current passenger service is not verified.",
"nullable": true,
"enum": [
null
]
},
"connections": {
"type": "string",
"description": "Unavailable, not an empty set of connections. No timetable feed is integrated.",
"nullable": true,
"enum": [
null
]
},
"sources": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"osm_type",
"osm_id",
"version",
"updated_at",
"url",
"fields"
],
"properties": {
"osm_type": {
"type": "string",
"enum": [
"node",
"way",
"relation"
]
},
"osm_id": {
"type": "integer",
"minimum": 1
},
"version": {
"type": "integer",
"minimum": 1
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "OSM edit timestamp, not a verification of current service."
},
"url": {
"type": "string",
"format": "uri"
},
"fields": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
}
}
}
}
},
"meta": {
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"total",
"license",
"license_url",
"attribution",
"snapshot_at",
"retrieved_at",
"transformation_version",
"source_record_count",
"snapshot_record_count",
"scope",
"limitations",
"sources"
],
"properties": {
"dataset": {
"enum": [
"osm-geofabrik-morocco-rail"
]
},
"total": {
"type": "integer",
"minimum": 0
},
"license": {
"enum": [
"ODbL-1.0"
]
},
"license_url": {
"enum": [
"https://opendatacommons.org/licenses/odbl/1-0/"
]
},
"attribution": {
"enum": [
"© OpenStreetMap contributors"
]
},
"snapshot_at": {
"enum": [
"2026-11-13T21:22:20Z"
]
},
"retrieved_at": {
"enum": [
"2026-11-14"
]
},
"transformation_version": {
"enum": [
"1.0.0"
]
},
"source_record_count": {
"enum": [
178
]
},
"snapshot_record_count": {
"enum": [
151
]
},
"scope": {
"type": "string",
"minLength": 1
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"sources": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"producer",
"source_url",
"resource_url",
"license",
"source_updated_at",
"sha256"
],
"properties": {
"producer": {
"type": "string",
"minLength": 1
},
"source_url": {
"type": "string",
"format": "uri"
},
"resource_url": {
"type": "string",
"format": "uri"
},
"license": {
"enum": [
"ODbL-1.0"
]
},
"source_updated_at": {
"type": "string",
"format": "date-time"
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
}
}
}
}
}
}
}المصادر وتقسيم الصفحات 20
metaobjectسياق النتيجة: المصادر والتواريخ والرخصة وتقسيم الصفحات عند الاقتضاء.
meta.datasetstringاسم مجموعة البيانات الخاصة بالنتيجة أو المصدر.
القيم المقبولة:
"osm-geofabrik-morocco-rail"meta.totalintegerعدد النتائج المطابقة للمرشحات قبل تقسيم الصفحات؛ وليس حجم هذه الصفحة.
meta.licensestringرخصة إعادة الاستخدام. تعني mixed وجود رخص مختلفة: راجع كل مصدر.
القيم المقبولة:
"ODbL-1.0"meta.license_urlstringرابط شروط الرخصة؛ null عند غياب الرابط.
القيم المقبولة:
"https://opendatacommons.org/licenses/odbl/1-0/"meta.attributionstringإشارة النسبة المطلوبة لبيانات OSM.
القيم المقبولة:
"© OpenStreetMap contributors"meta.snapshot_atstringتاريخ ووقت نسخة OSM، مستقلان عن تعديلات العناصر.
القيم المقبولة:
"2026-11-13T21:22:20Z"meta.retrieved_atstringتاريخ جلب المشروع لملف المصدر؛ وليس تاريخ رصد البيانات.
القيم المقبولة:
"2026-11-14"meta.transformation_versionstringإصدار قواعد تحويل مجموعة البيانات؛ مستقل عن إصدار الواجهة.
القيم المقبولة:
"1.0.0"meta.source_record_countnumberعدد السجلات في المصدر قبل مرشحات الواجهة.
القيم المقبولة:
178meta.snapshot_record_countnumberعدد سجلات النسخة بعد الاستبعاد والدمج المراجع وقبل مرشحات الطلب.
القيم المقبولة:
151meta.scopestringالنطاق الذي تغطيه البيانات؛ لا يعني تغطية شاملة.
meta.limitationsstring[]القيود المعروفة للمصدر أو التغطية؛ اقرأها قبل استخدام البيانات.
meta.sourcesobject[]مصدر ورخصة النسخة المنزلة.
meta.sources[].producerstringالجهة التي تنشر البيانات الأصلية.
meta.sources[].source_urlstringصفحة نشر المصدر أو التعريف ببياناته.
meta.sources[].resource_urlstringرابط الملف أو المورد المستخدم فعلياً.
meta.sources[].licensestringرخصة إعادة الاستخدام. تعني mixed وجود رخص مختلفة: راجع كل مصدر.
القيم المقبولة:
"ODbL-1.0"meta.sources[].source_updated_atstringآخر تحديث معلن من المصدر؛ وليس تاريخ جلب الملف.
meta.sources[].sha256stringبصمة SHA-256 لملف PBF الأصلي كاملاً.
الأخطاء
400: معامل غير صالح أو مفقود.404: المورد غير موجود.
تتضمن الأخطاء error.code وerror.message وerror.request_id.
errorobjectتفاصيل الطلب الفاشل؛ تحل محل data وmeta.
error.codestringرمز ثابت للخطأ، مثل RESOURCE_NOT_FOUND؛ استعمله في منطق التطبيق.
error.messagestringشرح مقروء للخطأ؛ استعمل code في منطق التطبيق.
error.request_idstringمعرّف هذا الطلب، يفيد عند الإبلاغ عن مشكلة.