Commit graph

243 commits

Author SHA1 Message Date
Alexey Zakharenkov
a6b76068f8 Defer CSV-complying data transformation to write-to-CSV phase 2022-10-20 23:18:20 +03:00
Alexey Zakharenkov
314941ea28 Add to GTFS only transfers in which both stops are part of routes 2022-10-20 23:18:20 +03:00
Alexey Zakharenkov
84253f9982 Refactoring: make main() function and two more functions 2022-10-14 14:27:58 +03:00
Alexey Zakharenkov
637c1b303b More accurate OSM element centers calculation 2022-10-14 14:27:58 +03:00
Alexey Zakharenkov
8abc48eb86 Remove duplicate variable assignment 2022-10-14 14:27:58 +03:00
Alexey Zakharenkov
e53683655d Refactoring: move a nested function to the module level; add tests for it 2022-10-13 13:59:51 +03:00
Alexey Zakharenkov
a9c32e3c12 Add two new checks 2022-10-13 13:59:51 +03:00
Alexey Zakharenkov
f43e7e7b39 Create method to allow overriding 2022-10-13 13:59:51 +03:00
Alexey Zakharenkov
0e60535121 Take into account that City.validate() method may never be called for a city - in case a CriticalValidationError occured 2022-09-29 20:55:46 +03:00
Alexey Zakharenkov
58f59a8478 Validation error 'Stop ... is nowhere near the tracks' was mistakenly supressed and now returned 2022-09-29 20:55:46 +03:00
Alexey Zakharenkov
00e5130836 Fix attribute assignment 2022-09-29 20:55:46 +03:00
Alexey Zakharenkov
05b9478dec Fixes to GTFS generation 2022-08-18 15:48:26 +03:00
Alexey Zakharenkov
133f5608d4 Make City.is_good a property 2022-07-13 09:48:53 +03:00
Alexey Zakharenkov
0c8821b850 Use csv.DictReader instead of csv.reader to load city data 2022-07-13 09:48:53 +03:00
Alexey Zakharenkov
a684370eb6 Add tests on adjusting rails geometry; configure GitHub Actions for the tests 2022-07-13 09:48:53 +03:00
Alexey Zakharenkov
0a304a96c3 Methods to adjust rails at route start/end 2022-07-13 09:48:53 +03:00
Alexey Zakharenkov
c5f9161321 Refactor Route.__init_() to separate stops processing from rails processing 2022-07-13 09:48:53 +03:00
Alexey Zakharenkov
277f5b0e91 GTFS output 2022-06-23 13:56:00 +03:00
Alexey Zakharenkov
a035e8f40d Revert PR #18 as incorrect: there may be lines with the same ref in a network 2022-05-27 15:20:26 +03:00
Jiaxun Yang
a676caf985 Suggest the parent route of platform with invalid role
The wraning message now looks like: 
Platform "" (w1055889735) with invalid role '' in route (relation 2336456, "")
It will be easier for us to sort those issues.
2022-05-27 14:49:25 +03:00
Alexey Zakharenkov
7df15a390d Check route ref uniqueness within a city 2022-04-21 19:19:33 +03:00
Alexey Zakharenkov
d28b2f1503 Make "Route has no stops" a warning, not an error 2022-04-21 14:24:42 +03:00
Alexey Zakharenkov
9246f72998 Correct links to the repository and active validator instance 2021-11-19 12:56:33 +03:00
Alexey Zakharenkov
de63a46e5c
Merge pull request #14 from alexey-zakharenkov/add-error-severity-level
Make three levels of severity for validation messages
2021-11-09 18:35:55 +03:00
Alexey Zakharenkov
ef5bbab672 Return "error_if"-logic for tram lines count 2021-11-08 12:22:57 +03:00
Alexey Zakharenkov
76d9d0bbb9 Fix html layout so that tooltips stay inside window viewport 2021-11-03 23:30:32 +03:00
Alexey Zakharenkov
9d4d6c6583 Merge branch 'master' into add-error-severity-level 2021-11-03 13:46:48 +03:00
Claudius
0bc8f779ae More user friendly UX for severity level messaging
More user friendly severity level messaging

Included the changes I mentioned in [my earlier comment](https://github.com/alexey-zakharenkov/subways/pull/14#issuecomment-948391863) to:
- Add section headers to the different severity level messages
- Change the errors red colour to a accessible one
- Changed copy of entrance errors from "e:" to "ent:"
- Shortened an error message slightly to reduce possibility of it wrapping into a new line and have the "Under construction" keyword at the beginning of the sentence

CSS property width=fit-content is not supported in Firefox; shorten tooltip text; exclude empty validation message during HTML genertion
2021-11-03 10:56:10 +01:00
Claudius
a397360f43
Merge pull request #11 from claudiush/master
Always visible footer and improved hover colours
2021-10-22 09:34:07 +02:00
Alexey Zakharenkov
0a1115f4ec Make three levels of severity for validation errors 2021-10-16 00:50:02 +03:00
Claudius
2cb5e84694 Update v2h_templates.py
Tweaks to the HTML output template:
- Sticky footer so update timestamp always visible without scrolling
- Slight copy update to clarify that networks are shown behind the map link
- table row hover state now uses hue-rotate to ensure enough contrast as compared to whole line blue previously
2021-10-06 12:03:36 +02:00
Victor Popov
03e3333ec9 Workaround osmtools bugs with tempfiles
- Osmupdate does not pass tempfiles settings to osmconvert call,
  so ensure that current working dir is writable before launching osmupdate.
- Explicitly specify tempfiles location for osmfilter call.
2021-09-30 16:57:45 +03:00
Victor Popov
dd833f6639 Explicitly specify osmconvert tempfiles location 2021-09-30 09:17:42 +03:00
Victor Popov
4f8f7416f3 Various improvements
- Introduce PLANET_UPDATE_SERVER environment variable to allow
  overriding of default https://planet.openstreetmap.org/replication/
  update source.
- Explicitly specify path to temp files for osmupdate.
- Improve error handling in case when osmupdate fails: capture output
  and echo them (otherwise bash exits due to `set -e`)
- check_osmctools before using osmtools. This fixes error if both
  SKIP_PLANET_UPDATE and PLANET_METRO are specified.
2021-09-29 12:05:29 +03:00
Victor Popov
90597822f3 Add requirements.txt file for project, to be able to use virtual environments 2021-09-10 14:40:50 +03:00
Alexey Zakharenkov
6596d9789c PEPify-8 with black -l 79 -S 2021-08-02 15:45:56 +03:00
Alexey Zakharenkov
b422ccb6ad Use argparse module in mapsme_json_to_cities.py 2021-08-02 15:45:56 +03:00
Alexey Zakharenkov
2dfb2e46e0 Get rid of obsolete --bbox parameter for process_subways.py 2021-08-02 15:45:56 +03:00
Alexey Zakharenkov
2734f9fd9e Update README 2021-08-02 15:45:56 +03:00
Alexey Zakharenkov
44c6dc77e4 Elaborate planet processing pipeline 2021-08-02 15:45:56 +03:00
Alexey Zakharenkov
4884c711c2 mapsme_json_to_cities.py script 2021-08-02 15:45:56 +03:00
Alexey Zakharenkov
724a9344a9 Add 'POLY' parameter to bash script and a script to generate a *.poly file with metro bbox union 2021-08-02 15:45:56 +03:00
Alexey Zakharenkov
cc0fee6167
Update subway_structure.py 2021-04-20 00:24:41 +03:00
Alexey Zakharenkov
e64fbbee97 Fixes after review 2020-10-13 11:21:56 +03:00
Alexey Zakharenkov
14e96bb806 While checking stops order on tracks, take into account repeated tracks/stations in a route like Line 5 of Oslo metro or spoon-shaped Line 7bis in Paris 2020-10-13 11:21:56 +03:00
Alexey Zakharenkov
6eb7ec8586 While checking stops order on tracks, take into account that more than one stop can reside on the same track segment 2020-10-13 11:21:56 +03:00
Alexey Zakharenkov
7e575b36cd Check stops order on tracks 2020-10-13 11:21:56 +03:00
Alexey Zakharenkov
75dd90e02e Disallow railway=station tag on relations other than multipolygons, in particular on stop_areas 2020-08-31 18:51:44 +03:00
Alexey Zakharenkov
53791838de [render] Syncronize URL hash with selected city 2020-08-24 22:41:53 +05:00
Alexey Zakharenkov
691b9cd60d Link to metro map beside each city name 2020-08-24 22:41:53 +05:00