GTFS Editor frontend app for Django
Project description
GTFS Shape Editor
GTFS Editor, Django App
GTFS Shape Editor is mainly a frontend app which uses Vue, OpenLayers/OpenStreetMap, sweetalert2 and Bootstrap. Editor shows a map max width where you can draw and route shapes, place stops and edit the properties in the tables just below.
Install
pip install shapeeditor
Add the app 'shapeeditor' in your Django project settings file
INSTALLED_APPS = [
...
'shapeeditor',
...
]
Shapeeditor needs authentication to edit the data, define the LOGIN_URL variable to know where redirect if visitor is not logged.
LOGIN_URL='/admin/login/'
# First point map extent area
# +++++++++
# + +
# + Map +
# + +
# ---> @++++++++
# Second point map extent area
# ++++++++@ <---
# + +
# + Map +
# + +
# +++++++++
SHAPEEDITOR_MAP_EXTENT_AREA = [
[-84.43669241118701, 9.726525930153954],
[-83.72894500499169, 9.99625455768836]]
# Center by default on load
SHAPEEDITOR_MAP_CENTER = [-84.1027104, 9.865107]
# Router it could ask for shape generation
SHAPEEDITOR_ROUTING_MACHINE_URL = "http://router.project-osrm.org/route/v1/driving/"
Include 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.
urlpatterns = [
path('shapeeditor/', include('shapeeditor.urls')),
]
Just to be sure database is ok run the next commands.
./manage.py makemigrations
./manage.py migrate
Usage
There is not a manual yet, but essentially the map 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.
Unistall
pip uninstall shapeeditor
Then delete it from settings.py mentions.
How to give my contribution
You could fork and PR, suggestions are welcome.
Here some screenshots:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shapeeditor-0.1.4.tar.gz.
File metadata
- Download URL: shapeeditor-0.1.4.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
335e59b9ea532a982f7cb8ea7e35f8368231be15966b1c5b80555bba00ef9915
|
|
| MD5 |
45c6903810bf7803907889960de18379
|
|
| BLAKE2b-256 |
7df92e28fae466850cd7ebeb89738d4a485d51286b6d9a29891044745359020e
|
File details
Details for the file shapeeditor-0.1.4-py2.py3-none-any.whl.
File metadata
- Download URL: shapeeditor-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40f92b4a085d365b27c16d117f27a4ed3ad60dfe5de4f116fc34ca47f6b630cb
|
|
| MD5 |
4b3e5203ae7988be27d5e42138628102
|
|
| BLAKE2b-256 |
04ae02c9a8bc4c8824b6df19e2e8b00c1a0be808193580d228edc3b3654423bf
|