{"id":21286575,"url":"https://github.com/jeancahu/gtfs_shapes_editor_js","last_synced_at":"2025-07-11T11:32:48.912Z","repository":{"id":57466617,"uuid":"302069276","full_name":"jeancahu/GTFS_shapes_editor_JS","owner":"jeancahu","description":"GTFS Shape Editor Django app, draw and manage shapes using this app in your website.","archived":false,"fork":false,"pushed_at":"2023-10-01T20:15:37.000Z","size":524,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-08T22:01:56.427Z","etag":null,"topics":["django","gtfs","gtfs-generator","gtfs-shapes"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeancahu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-10-07T14:52:25.000Z","updated_at":"2024-04-29T14:31:21.000Z","dependencies_parsed_at":"2022-09-19T08:41:36.013Z","dependency_job_id":"fd380e0d-3d5e-49be-ae3c-b277def3a55d","html_url":"https://github.com/jeancahu/GTFS_shapes_editor_JS","commit_stats":{"total_commits":207,"total_committers":1,"mean_commits":207.0,"dds":0.0,"last_synced_commit":"57185ba3d1d9289de5394c394b2fe8974d8f3ec5"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jeancahu/GTFS_shapes_editor_JS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeancahu%2FGTFS_shapes_editor_JS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeancahu%2FGTFS_shapes_editor_JS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeancahu%2FGTFS_shapes_editor_JS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeancahu%2FGTFS_shapes_editor_JS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeancahu","download_url":"https://codeload.github.com/jeancahu/GTFS_shapes_editor_JS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeancahu%2FGTFS_shapes_editor_JS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264795402,"owners_count":23665231,"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":["django","gtfs","gtfs-generator","gtfs-shapes"],"created_at":"2024-11-21T11:29:58.215Z","updated_at":"2025-07-11T11:32:47.772Z","avatar_url":"https://github.com/jeancahu.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GTFS Shape Editor Django-App\n\nWebapp which uses Vue, OpenLayers/OpenStreetMap, sweetalert2 and Bootstrap.\nEditor shows a map where you can draw and route shapes, place stops and edit the properties in the tables just below.\n\n## Install\n```bash\npip install shapeeditor\n```\n\nAdd the app 'shapeeditor' in your Django project settings file\n\n```python\nINSTALLED_APPS = [\n    ...\n    'shapeeditor',\n    ...\n]\n```\n\nShapeeditor needs authentication to push data to database, define the LOGIN\\_URL variable to know where redirect visitor when they are not logged.\n\n```python\nLOGIN_URL='/admin/login/'\n\n# First point map extent area [longitude, latitude]\n#       +++++++++\n#       +       +\n#       +  Map  +\n#       +       +\n# ---\u003e  @++++++++\n\n# Second point map extent area [longitude, latitude]\n# ++++++++@ \u003c---\n# +       +\n# +  Map  +\n# +       +\n# +++++++++\n\nSHAPEEDITOR_MAP_EXTENT_AREA = [\n    [-84.43669241118701, 9.726525930153954],\n    [-83.72894500499169, 9.99625455768836]]\n\n# Center by default on load [longitude, latitude]\nSHAPEEDITOR_MAP_CENTER = [-84.1027104, 9.865107]\n\n# Router service for shape generation request (This one is a free demo)\nSHAPEEDITOR_ROUTING_MACHINE_URL = \"http://router.project-osrm.org/route/v1/driving/\"\n```\n\nInclude Shapeeditor urls in urls.py, then we can open the editor from the site, draw the shape and download as a shapes.txt or import it to the database.\n\n```python\nurlpatterns = [\n    path('shapeeditor/', include('shapeeditor.urls')),\n]\n```\n\nJust to be sure database is ok run the next commands.\n```bash\n./manage.py makemigrations\n./manage.py migrate\n```\n\n## Usage\n\n```bash\n./manage.py runserver localhost:8080\n\n## Open the editor in your favorite browser\nfirefox localhost:8080/shapeeditor\n```\n\n\nMap interface allows the user to draw a shape, cut links and delete links and nodes, to create a shape you need to define two _endpoints_ then put _waypoints_ between the begin and end, more waypoints means better aproximation.\n\nMost of the features are already implemented in JS but there is not a GUI equivalent to call for methods yet.\n\nShapes are made with nodes, nodes have a type, it could be _endpoint_ for start or end of shapes, _stops_, these can be part of the shape too, _fork_ are the nodes where are more than two links, _waypoint_ are the common nodes. To create a Shape first draw paths clicking on map with the interaction _add\\_node_, when you already have a connection between two _endpoints_ through multiple nodes and links add a Shape in the section below, once added the shape pick the waypoints with _select\\_node_ + Shift, when you pick a _waypoint_ and it is in a shape segment, the whole segment is selected, pick only _waypoints_ their segments are in the shape.\n\nPick waypoints from the start node to the final node, keep the waypoints in order to avoid backward motion, when you pick a waypoint the section\u003eaccordion for the shape we are adding the waypoints will show the waypoints list, when the the waypoints are enough click on **save** button to write the shape, then push it to database.\n\n### Hide and show elements on map\n\nhttps://user-images.githubusercontent.com/18200186/135690366-f2075476-8246-4764-a464-fca59e1b1a7d.mp4\n\n### Add and delete nodes\n\nhttps://user-images.githubusercontent.com/18200186/135690845-87f48d78-453e-4da0-bfb4-e5fdbf25e1f2.mp4\n\n### Remove and split links\n\nhttps://user-images.githubusercontent.com/18200186/135691010-26e44323-4f7c-47ae-8822-450c01d793de.mp4\n\n## Uninstall\nJust delete all the mentions in settings.py and remove the package from your Python libs\n```bash\npip uninstall shapeeditor\n```\n\n## How to contribute\nPR are welcome.\n\nHere some screenshots: \u003c/br\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/18200186/138203710-4146d687-c57c-402b-8b66-c592d9260c8c.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/18200186/138203882-a5767d75-bce4-468b-b1f7-66ab788b5c5c.png\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeancahu%2Fgtfs_shapes_editor_js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeancahu%2Fgtfs_shapes_editor_js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeancahu%2Fgtfs_shapes_editor_js/lists"}