{"id":19380767,"url":"https://github.com/helleb0re/cpp-transport-catalogue","last_synced_at":"2025-07-18T16:07:54.684Z","repository":{"id":130969041,"uuid":"597487212","full_name":"helleb0re/cpp-transport-catalogue","owner":"helleb0re","description":"Транспортный справочник","archived":false,"fork":false,"pushed_at":"2023-06-18T16:20:30.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T16:52:47.954Z","etag":null,"topics":["cpp","cpp17","graph-algorithms","protobuf"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helleb0re.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-04T17:48:51.000Z","updated_at":"2023-06-18T16:21:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"2cb6a3b9-03db-43a6-b449-9ecd44e10a51","html_url":"https://github.com/helleb0re/cpp-transport-catalogue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/helleb0re/cpp-transport-catalogue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helleb0re%2Fcpp-transport-catalogue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helleb0re%2Fcpp-transport-catalogue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helleb0re%2Fcpp-transport-catalogue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helleb0re%2Fcpp-transport-catalogue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helleb0re","download_url":"https://codeload.github.com/helleb0re/cpp-transport-catalogue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helleb0re%2Fcpp-transport-catalogue/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265791734,"owners_count":23829165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp17","graph-algorithms","protobuf"],"created_at":"2024-11-10T09:14:44.789Z","updated_at":"2025-07-18T16:07:54.672Z","avatar_url":"https://github.com/helleb0re.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Транспортный каталог**\n\nПроект траспортного каталога, который позволяет создать базу данных общественного транспорта, визуализировать маршруты в формате SVG и найти кратчайший путь между остановками.\n\nВ проекте используются следующие технологии:\n- JSON - формат взаимодействия с сервером\n- Protobuf - хранение данных БД в сериализованном виде\n\n## **Использование**\n- Запрос на добавление данных в БД\n  ```json\n  \"base_requests\": [\n    // добавление информации о маршруте\n    {\n      \"type\": \"Bus\",\n      \"name\": \"134\",\n      \"stops\": [\"Stop-1\", \"Stop-2\"],\n      \"is_roundtrip\": false\n    },\n    // добавление информации об остановках\n    {\n      \"type\": \"Stop\",\n      \"name\": \"Stop-1\",\n      \"latitude\": 34.325467,\n      \"longitude\": 45.351613,\n      \"road_distances\": {\"Stop-2\": 1500}\n    },\n    {\n      \"type\": \"Stop\",\n      \"name\": \"Stop-2\",\n      \"latitude\": 36.325467,\n      \"longitude\": 45.121613,\n      \"road_distances\": {\"Stop-1\": 1500}\n    }\n  ]\n  ```\n- Запрос на получение данных из БД\n  ```json\n  \"stat_requests\": [\n    // получение карты в SVG формате\n    { \"id\": 1, \"type\": \"Map\" },\n    // получение информации об остановке\n    { \"id\": 2, \"type\": \"Stop\", \"name\": \"Stop-1\" },\n    // получение информации о маршруте\n    { \"id\": 3, \"type\": \"Bus\", \"name\": \"134\" }\n  ]\n  ```\n\n- Ответ БД на запросы\n  ```json\n  [\n    // карта в SVG формате\n      {\n          \"map\": \"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?\u003e\\n\u003csvg xmlns=\\\"http://www.w3.org/2000/svg\\\" version=\\\"1.1\\\"\u003e\\n\u003cpolyline points=\\\"46.1,170 30,30 46.1,170\\\" fill=\\\"none\\\" stroke=\\\"green\\\" stroke-width=\\\"14\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"/\u003e\\n\u003ctext x=\\\"46.1\\\" y=\\\"170\\\" dx=\\\"7\\\" dy=\\\"15\\\" font-size=\\\"20\\\" font-family=\\\"Verdana\\\" font-weight=\\\"bold\\\" fill=\\\"rgba(255,255,255,0.85)\\\" stroke=\\\"rgba(255,255,255,0.85)\\\" stroke-width=\\\"3\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"\u003e134\u003c/text\u003e\\n\u003ctext x=\\\"46.1\\\" y=\\\"170\\\" dx=\\\"7\\\" dy=\\\"15\\\" font-size=\\\"20\\\" font-family=\\\"Verdana\\\" font-weight=\\\"bold\\\" fill=\\\"green\\\"\u003e134\u003c/text\u003e\\n\u003ctext x=\\\"30\\\" y=\\\"30\\\" dx=\\\"7\\\" dy=\\\"15\\\" font-size=\\\"20\\\" font-family=\\\"Verdana\\\" font-weight=\\\"bold\\\" fill=\\\"rgba(255,255,255,0.85)\\\" stroke=\\\"rgba(255,255,255,0.85)\\\" stroke-width=\\\"3\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"\u003e134\u003c/text\u003e\\n\u003ctext x=\\\"30\\\" y=\\\"30\\\" dx=\\\"7\\\" dy=\\\"15\\\" font-size=\\\"20\\\" font-family=\\\"Verdana\\\" font-weight=\\\"bold\\\" fill=\\\"green\\\"\u003e134\u003c/text\u003e\\n\u003ccircle cx=\\\"46.1\\\" cy=\\\"170\\\" r=\\\"5\\\" fill=\\\"white\\\"/\u003e\\n\u003ccircle cx=\\\"30\\\" cy=\\\"30\\\" r=\\\"5\\\" fill=\\\"white\\\"/\u003e\\n\u003ctext x=\\\"46.1\\\" y=\\\"170\\\" dx=\\\"7\\\" dy=\\\"-3\\\" font-size=\\\"20\\\" font-family=\\\"Verdana\\\" fill=\\\"rgba(255,255,255,0.85)\\\" stroke=\\\"rgba(255,255,255,0.85)\\\" stroke-width=\\\"3\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"\u003eStop-1\u003c/text\u003e\\n\u003ctext x=\\\"46.1\\\" y=\\\"170\\\" dx=\\\"7\\\" dy=\\\"-3\\\" font-size=\\\"20\\\" font-family=\\\"Verdana\\\" fill=\\\"black\\\"\u003eStop-1\u003c/text\u003e\\n\u003ctext x=\\\"30\\\" y=\\\"30\\\" dx=\\\"7\\\" dy=\\\"-3\\\" font-size=\\\"20\\\" font-family=\\\"Verdana\\\" fill=\\\"rgba(255,255,255,0.85)\\\" stroke=\\\"rgba(255,255,255,0.85)\\\" stroke-width=\\\"3\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\"\u003eStop-2\u003c/text\u003e\\n\u003ctext x=\\\"30\\\" y=\\\"30\\\" dx=\\\"7\\\" dy=\\\"-3\\\" font-size=\\\"20\\\" font-family=\\\"Verdana\\\" fill=\\\"black\\\"\u003eStop-2\u003c/text\u003e\\n\u003c/svg\u003e\",\n          \"request_id\": 1\n      },\n      // Информация об остановке Stop-1\n      {\n          \"buses\": [\n              \"134\"\n          ],\n          \"request_id\": 2\n      },\n      // Информация о маршруте 134\n      {\n          \"curvature\": 0.00671543,\n          \"request_id\": 3,\n          \"route_length\": 3000,\n          \"stop_count\": 3,\n          \"unique_stop_count\": 2\n      }\n  ]\n  ```\n- Изображение карты\n\n  \u003cimg src=\"./transport-catalogue/data/map.svg\" height=200px\u003e\n\n\n## **Зависимости**\n\n1. [С++17](https://en.cppreference.com/w/cpp/17)\n2. [GCC(MinGW-w64)](https://www.mingw-w64.org/) 11+ version requires\n3. [CMake](https://cmake.org) 3.8 version requires\n4. [Protobuf](https://protobuf.dev/) use proto3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelleb0re%2Fcpp-transport-catalogue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelleb0re%2Fcpp-transport-catalogue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelleb0re%2Fcpp-transport-catalogue/lists"}