Skip to main content

amarillo-stops

Carpool stop import library with shared code for Amarillo GTFS-generator and Enhancer. Provides stop import functions in multiple formats and the StopsStore class with a couple of function to manage and query the stops.

Supported import formats

Import stops from:

.csv:

Example format:

stop_id;stop_code;stop_lat;stop_lon;stop_name
mfdz:x;x;52.11901;14.2;Stop x
mfdz:y;y;53.1;14.01;Stop y
mfdz:z;z;54.11;14.0;Stop z
mfdz:Ang001;Ang001;53.11901;14.015776;Mitfahrbank Biesenbrow

GeoJSON:

Example format:

{
  "data": {
    "pointsOfInterest": [
      {
        "id": "14622",
        "externalId": "bbnavi:12073:0001",
        "name": "Parkbank",
        "description": "Parkbank",
        "dataProvider": {
          "id": "1",
          "name": "Administrator"
        },
        "addresses": [
          {
            "street": "Hauptstrasse",
            "city": "Wittenberge",
            "zip": "12345",
            "geoLocation": {
              "latitude": 52.9932971109789,
              "longitude": 11.767383582547
            }
          }
        ],
        "openStreetMap": {
          "capacity": 112,
          "capacityCharging": "2",
          "capacityDisabled": "",
          "fee": "No",
          "lit": "Yes",
          "parking": "",
          "shelter": "No",
          "surface": "",
          "utilization": "",
          "website": ""
        }
      }
    ]
  }
}

Overpass

Makes a request to https://overpass-api.de/api/interpreter with the query below and imports the result:

[out:csv(::"type", ::"id", ::"lat", ::"lon", name,parking,park_ride,operator,access,lit,fee,capacity,"capacity:disabled",supervised,surface,covered,maxstay,opening_hours)][timeout:60];
area{area_selector}->.a;
nwr(area.a)[park_ride][park_ride!=no][access!=customers];
out center;

GTFS

Opens stops.txt inside the zip file and imports it as .csv

StopsStore class

Constructor parameters:

  • stop_sources: array of stop source urls. Can point to local or remote resources. vicinity controls how far from the trip path they can still be associated with a trip. Example:
[
    {"url": "https://datahub.bbnavi.de/export/rideshare_points.geojson", "vicinity": 50},
    {"url": "https://data.mfdz.de/mfdz/stops/stops_zhv.csv", "vicinity": 50},
    {"url": "https://data.mfdz.de/mfdz/stops/parkings_osm.csv", "vicinity": 500}
]
  • internal_projection: optionally override the used projection. Default value is EPSG:32632.

load_stop_sources(self): Imports stops from stop_sources and registers them with the distance they are still associated with a trip. E.g. bus stops should be registered with a distance of e.g. 30m, while larger carpool parkings might be registered with e.g. 500m.

Subsequent calls of load_stop_sources will reload all stop_sources but replace the current stops only if all stops could be loaded successfully.

find_additional_stops_around(self, line, stops): Returns a GeoDataFrame with all stops in vicinity of the given line, sorted by distance from origin of the line. Note: for internal projection/distance calculations, the lat/lon geometries of line and stops are converted to

find_closest_stop(self, carpool_stop, max_search_distance): Returns the closest stop to the given carpool stop, searching within the max_search_distance

Metadata

Release files for amarillo-stops 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amarillo-stops 2.0.0
File Size Uploaded Provenance Actions
amarillo_stops-2.0.0.tar.gz 43.7 kB Without provenance Details for amarillo_stops-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for amarillo-stops 2.0.0
File Interpreter ABI Platform Actions
amarillo_stops-2.0.0-py3-none-any.whl Python 3 none any Details for amarillo_stops-2.0.0-py3-none-any.whl

Total release size: 77.3 kB

Release files / amarillo_stops-2.0.0.tar.gz

Download URL amarillo_stops-2.0.0.tar.gz
Size 43.7 kB
Tags Source
SHA-256 checksum
How to use checksums
04e3a8ff3a31f801e45498d5c58b5f5db0cadac295f78b815ff245acb5a36580
BLAKE2b-256 checksum
How to use checksums
0c3e5a7690bcbd31c442ece81d954dac8b3e32682c272422b0ded4995de0b1a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.2

Release files / amarillo_stops-2.0.0-py3-none-any.whl

Download URL amarillo_stops-2.0.0-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66b97fc8d5a54263beff6d6e4f94c30c61ac4e6a53f7ec584e96e6282913a45e
BLAKE2b-256 checksum
How to use checksums
ab0bd5749664d2991b60d921358320cb66c35b1d6e51c2089821b42a41060a6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.2

Security for amarillo-stops 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page