osm-tonie / ptna-www Goto Github PK
View Code? Open in Web Editor NEWWebsite pages for the ptna tool
License: GNU General Public License v3.0
Website pages for the ptna tool
License: GNU General Public License v3.0
list_durations might then no be aligned with list_departures is it was unsorted before
repo 'gtfs' shall ensure that list_departures is aligned and list_durations fits
see https://github.com/osm-ToniE/ptna/issues #139
for the ptna-www related part
See discussions on this in forum:
https://forum.openstreetmap.org/viewtopic.php?pid=785873#p785873
ptna-www: create a page with JavaScript which does all the stuff, relation-ID passed as CGI parameter
GET api.openstreetmap.org/api/0.6/relation/<id>/full
but do not forget to load member-relations additionally and separately
maybe use leaflet GeoJSON()
This allows a more generic copy&paste of data into editors
key=value\r\n
separated entries are accepted by
Suggested by JesseFTW
Current situaltion:
ptna-network.sh
from ptna
repository changes these index.html
files after every single analysis run using sed
command.index.html
files in GitHub
are never up-to-dateGitHub
Alternative:
let ptna-network.sh
provide the required information in dedicated *.txt
files (like: results/DE/BY/DE-BY-MVV-Analysis-details.txt
)
replace results/xx/index.html
by results/xx/index.php
let results/xx/index.php
read the dedicated information files using PHP code
redirect from results/xx/index.html
to results/xx/index.php
using a JavaScript window.onload=window.open()
or so.
start small with new and old dates in (UTC and local time) as well as new-or-old indicator
extend later to create the complete table row from those information files
ptna-networks
as well, specify all information in the settings.sh
file of a 'network'
GitHub
GitHub
Hi Toni,
ich hab mal versucht die Relationsanalyse schneller zu machen. Glaub das Problem ist das zu viele DOM Aktionen stattfinden.. zu oft .innerHTML
Ich hab in der Datei die Funktion handleMember() ersetzt und addtable() zusätzlich erstellt. Faktor 40x schneller.. ich hab die Funktion handleMember() vereinfacht.. und ein paar Sachen rausgenommen.. die ich als unnötig finde ;-) Musst du wissen.. die alte Funktion ist sehr kompliziert, darum hab ich sie ersetzt. Vielleicht braucht man ein paar Sachen auch nicht mehr wenn es so schnell jetzt läuft.
script/relation.js
set upload='never'
propose:
check if stop_id == IFOPT - must be supported in osm.txt file/table of feed
if so, propose
Instead of using for example
use
if feed and release_date are empty, the old style shall still work though
'feed' shall replace 'network'
Related to JOSM trac ticket #22978
PTNA shall support analysis of GTFS data.
Start with DE-BY-MVV GTFS data.
A tool from gtfs repository shall prepare the original GTFS data for an optimized use in PTNA.
based on "ptna_analysis" in osm table of DB
DE-SPNV and DE-S-und-U-Bahnen have strange route_short_name
Provide a hack the reads creates the OSM 'ref' from route_long_name (if this is different from route_id)
relation.phpuses
margin-left = margin-rght = 16px
Map is 50% and Tables are 49.146.
This fits well for 1920 px horizontal size with vertical scroll bar but not for smaller numbers, ...
Then, tables are positioned below the map :(
Loading long/big routes with lots of members takes a while to analyze, whilc eht browser does not respond (on that page).
The for-loop shall be broken into pieces and iteration shall be done via setTimeout(handleMember,0, ...)
i.e. for gtfs/BR/*.php, the default should be pt_BR, but user might want to change to 'en'
See: OSM community thread
In the Netherlands, we have a GTFS feed of all public transport, see gtfs.ovapi.nl
Travel information is available in the Netherlands as open data with CC0 clearance. Copyright and database rights have been waived by governments and carriers.
See also: osm-ToniE/gtfs-feeds#25
See discussion starting @ https://community.openstreetmap.org/t/ptna-news-for-public-transport-network-analysis/8383/15
instead of having tons of "Discussion" links into the OSM-Wiki, create the same information dynamically via PHP.
This need support from PTNA code.
In CreateGtfsRoutesEntry( $network ) code <tr id="..." ...>
where id is built our of 'type' and 'ref' in OSM terms, i.e. RouteType2OsmRoute( route_type ) and route_short_name|"not set' and if necessary a unique suffix
Similar to PTNA-Analysis
We can have
Present all available sources on the top of each gtfs/xxx.pgp page.
In a time line indicating the current one (handled on that page), linking to the routes.php page wit the appropriate network=.
Also showing where 'previous' and 'long-term' and DE-BY-MM are pointing to
Roughly: number of days where service is provides multiplied by number of departures per day
ptna_trips has "list_service_ids" which includes a list of service_ids (corresponds to each departure time in list_departures)
calendar: for each relevant service_id find the number of service days (end_date - start_date) * (week_days with '1') / 7
calendar_dates: for each relevant service_id add the number of "exception_type == 1" and subtract the number of "exception_type == 2"
for this trip_id take the service_ids and their individual number out of "list_service_ids" and multiply those numbers with the individual number of service days per service_id
one for the download time
one for the progress in analyzing members
separate more strings into language dependent files, not country specific files
expecially for gtfs/*
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.