skillfed

searoute

A python package for generating the shortest sea route between two points on Earth.

searoute v1.6.0 85.5K downloads/30d#13,921 on PyPI152
Permissive license Apache-2.0 Active released

What it is and what it does

Searoute computes realistic shortest paths across ocean waters between two points on Earth, accounting for land masses by finding the nearest sea point if either endpoint is on land. It returns a GeoJSON LineString Feature with calculated distance and optional port information, designed for visualizing maritime routes rather than for actual ship navigation.

The package uses a graph-based approach with networkx as the default backend (or igraph optionally for performance), and supports customization through user-supplied node and edge networks, passage restrictions (e.g., avoiding the Suez Canal), and preferred port selection via area-based weighting. Distance can be computed in multiple units (kilometers, miles, nautical miles, etc.) and duration estimates are available based on vessel speed.

Use it for:

  • Generate realistic sea routes for maritime trade flow visualizations and shipping analytics dashboards
  • Calculate approximate voyage durations and distances for supply chain planning and logistics simulation
  • Build interactive maps showing port-to-port connectivity with customizable passage restrictions
  • Analyze maritime chokepoints by computing routes that avoid specific straits or canals
  • Create educational visualizations of global shipping patterns and international trade corridors

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Computes the shortest sea route between two geographic points, returning a GeoJSON LineString with distance and optional port information for maritime visualization.

Yes, if you need to visualize or analyze maritime routes. The package is actively maintained, has no known vulnerabilities, and is licensed permissively. High install friction (two non-trivial dependencies) is manageable for projects where route visualization is a core feature. Not suitable for real-time navigation or precise maritime routing.

Install

searoute on PyPI

pip

pip install searoute

uv

uv add searoute

poetry

poetry add searoute

Installing searoute

Before you install

High install friction due to dependencies on geojson and networkx, though both are stable. Active maintenance with recent releases; last commit 2026-05-17 and 152 repository stars indicate ongoing development.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

pip install searoute

import searoute as sr

origin = [0.3515625, 50.064191736659104]
destination = [117.42187500000001, 39.36827914916014]
route = sr.searoute(origin, destination)
print("{:.1f} {}".format(route.properties['length'], route.properties['units']))

Verify before relying

  • Whether the package handles edge cases (e.g., antipodal points, routes crossing date line) reliably
  • Performance characteristics and scalability limits for repeated route calculations
  • Accuracy of the underlying maritime graph and how frequently it is updated

Package facts

License Apache-2.0 (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies 2 — geojson, networkx
Maintenance actively maintained — 89 days since the last release
Last repo commit
First released
Downloads 85,460/month — #13,921 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: searoute-1.6.0.tar.gz

Keywords: searoute, map, sea, route, ocean, ports

Development Status :: 5 - Production/StableIntended Audience :: Customer ServiceIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchIntended Audience :: Telecommunications IndustryLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

shortest sea route calculationmaritime route generationocean path findinggeospatial sea routingship route visualizationport-to-port routingmaritime distance computation
geospatialmaritimevisualization

More Scientific/Engineering packages