Skip to main content

A Python package that customizes Google Maps routing to avoid Swiss routes unless the origin, destination, or waypoints include locations within Switzerland.

Project description

https://img.shields.io/pypi/v/gmaps_avoid_swiss.svg Documentation Status

A Python package that customizes Google Maps routing to avoid Swiss routes unless the origin, destination, or waypoints include locations within Switzerland.

Dependencies

This package requires the GEOS library as it utilizes Shapely for geographic operations. For installation instructions and more details, please refer to Geos page.

Features

  • Calculates duration, transit time, and encoded path from origin to destination

  • Avoids routing through Switzerland by trying alternative routes or dynamically selecting alternative cities - If the initial route or alternative routes intersects with Switzerland, the system optimizes the route by selecting intermediate cities to avoid crossing Swiss borders - The cities are prioritized based on their proximity to the intersection points with Switzerland - The system iteratively tries different cities until a route that doesn’t pass through Switzerland is found - If no valid route is found after exhausting all city options, the system falls back to the original route

  • Right now its only possible to use address in format {"lat": 48.5734, "lng": 7.7521}

To-Do List

  • Add opting out of avoiding Swiss.

  • Improve Swiss route avoidance algorithms.

Credits

This package was created with Cookiecutter .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gmaps_avoid_swiss-0.1.9.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

gmaps_avoid_swiss-0.1.9-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file gmaps_avoid_swiss-0.1.9.tar.gz.

File metadata

  • Download URL: gmaps_avoid_swiss-0.1.9.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for gmaps_avoid_swiss-0.1.9.tar.gz
Algorithm Hash digest
SHA256 ad447822764469e159cd6e598fd2b51fcbd70105fa9f9cd92868784030dbc287
MD5 8dfec80a9cefe99f4ffb4a8c38f4ad89
BLAKE2b-256 3d6089f4cd568c8d2d7be8bc3a9629f7ac8ce0c4715348777e5481066b9c4827

See more details on using hashes here.

File details

Details for the file gmaps_avoid_swiss-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for gmaps_avoid_swiss-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9febfa3e5e92a50ea7b600d47b51dfcc22d2ad26134d19a03d7169b46659f52c
MD5 aa409beb7d6abac4ff12599c1f7eb14d
BLAKE2b-256 610f4df6a1f9c9d7f14dea3e3e337c005b1680f77899bdff36a505ea52fe0f99

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page