--- id: searoute version: "1.6.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # searoute — A python package for generating the shortest sea route between two points on Earth. License: permissive · Maintenance: active · Downloads: 85.5K/mo ## 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 above — 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 pip install searoute uv add searoute 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: unspecified - Install friction: high - Maintenance: active - Downloads: 85.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags shortest sea route calculation, maritime route generation, ocean path finding, geospatial sea routing, ship route visualization, port-to-port routing, maritime distance computation, geospatial, maritime, visualization [View on SkillFed](https://skillfed.io/packages/searoute) · [View on PyPI](https://pypi.org/project/searoute/)