gtfs_kit 2.2.0__tar.gz → 2.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gtfs-kit
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: A Python 3.6+ library for analyzing GTFS feeds.
5
5
  Home-page: https://github.com/mrcagney/gtfs_kit
6
6
  License: MIT
@@ -12,4 +12,4 @@ from .validators import *
12
12
  from .feed import *
13
13
 
14
14
 
15
- __version__ = "2.2.0"
15
+ __version__ = "2.2.1"
@@ -515,7 +515,7 @@ def map_trips(
515
515
  for f in collection["features"]:
516
516
  prop = f["properties"]
517
517
 
518
- # Add stop
518
+ # Add stop if present
519
519
  if f["geometry"]["type"] == "Point":
520
520
  lon, lat = f["geometry"]["coordinates"]
521
521
  fl.CircleMarker(
@@ -538,15 +538,16 @@ def map_trips(
538
538
  path.add_to(group)
539
539
  bboxes.append(sg.box(*sg.shape(f["geometry"]).bounds))
540
540
 
541
- # Direction arrows, assuming, as GTFS does, that
542
- # trip direction equals LineString direction
543
- fp.PolyLineTextPath(
544
- path,
545
- " \u27A4 ",
546
- repeat=True,
547
- offset=5.5,
548
- attributes={"fill": color, "font-size": "18"},
549
- ).add_to(group)
541
+ if include_arrows:
542
+ # Direction arrows, assuming, as GTFS does, that
543
+ # trip direction equals LineString direction
544
+ fp.PolyLineTextPath(
545
+ path,
546
+ " \u27A4 ",
547
+ repeat=True,
548
+ offset=5.5,
549
+ attributes={"fill": color, "font-size": "18"},
550
+ ).add_to(group)
550
551
 
551
552
  group.add_to(my_map)
552
553
 
@@ -554,7 +555,8 @@ def map_trips(
554
555
 
555
556
  # Fit map to bounds
556
557
  bounds = so.unary_union(bboxes).bounds
557
- bounds2 = [bounds[1::-1], bounds[3:1:-1]] # Folium expects this ordering
558
- my_map.fit_bounds(bounds2)
558
+ # Folium wants a different ordering
559
+ bounds = [(bounds[1], bounds[0]), (bounds[3], bounds[2])]
560
+ my_map.fit_bounds(bounds)
559
561
 
560
562
  return my_map
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "gtfs_kit"
3
- version = "2.2.0"
3
+ version = "2.2.1"
4
4
  description = "A Python 3.6+ library for analyzing GTFS feeds."
5
5
  authors = ["Alex Raichev <araichev@mrcagney.com>"]
6
6
  readme = "README.rst"
@@ -19,7 +19,7 @@ install_requires = \
19
19
 
20
20
  setup_kwargs = {
21
21
  'name': 'gtfs-kit',
22
- 'version': '2.2.0',
22
+ 'version': '2.2.1',
23
23
  'description': 'A Python 3.6+ library for analyzing GTFS feeds.',
24
24
  'long_description': 'GTFS Kit\n********\n.. image:: https://travis-ci.org/mrcagney/gtfs_kit.svg?branch=master\n :target: https://travis-ci.org/mrcagney/gtfs_kit\n\nGTFS Kit is a Python 3.6+ kit for analyzing `General Transit Feed Specification (GTFS) <https://en.wikipedia.org/wiki/GTFS>`_ data in memory without a database.\nIt uses Pandas and Shapely to do the heavy lifting.\n\nThis project supersedes `GTFSTK <https://github.com/mrcagney/gtfstk>`_.\n\n\nInstallation\n=============\n``pip install gtfs_kit``.\n\n\nExamples\n========\nYou can play with ``ipynb/examples.ipynb`` in a Jupyter notebook.\n\n\nAuthors\n=========\n- Alex Raichev, 2019-09\n\n\nDocumentation\n=============\nOn Github Pages `here <https://mrcagney.github.io/gtfs_kit_docs>`_.\n\n\nNotes\n=====\n- Development status is Alpha\n- This project uses semantic versioning\n- Thanks to `MRCagney <http://www.mrcagney.com/>`_ for donating to this project\n- Constructive feedback and code contributions welcome. Please issue pull requests into the ``develop`` branch and include tests.\n',
25
25
  'author': 'Alex Raichev',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes