Skip to main content

An improved version of searoute package for calculating the shortest sea route between two points on Earth.

Project description

Sea Voyage

seavoyage는 해상 네트워크 기반의 선박 경로 탐색, 커스텀 제한구역(해역) 적용, 네트워크 시각화 등 다양한 해양 경로 분석 기능을 제공하는 Python 패키지입니다. 이 패키지는 searoute 패키지를 기반으로 개선되었습니다.

원본 프로젝트

  • 원본 패키지: searoute
  • 원작자: Gent Halili
  • 라이선스: Apache License 2.0

주요 기능

  • 해상 네트워크 기반 최적 경로 탐색
  • 커스텀 제한구역(GeoJSON) 등록 및 적용
  • 다양한 해상 네트워크 해상도(5km~100km) 지원
  • folium 기반 경로/네트워크 지도 시각화
  • 네트워크 및 경로의 GeoJSON 변환

설치

pip install seavoyage

개발 모드 설치

개발 중에 테스트를 쉽게 실행하려면 다음 명령으로 패키지를 개발 모드로 설치하세요:

pip install -e .

이렇게 하면 pytest.ps1 스크립트를 사용하지 않고도 바로 pytest 명령을 실행할 수 있습니다.

빠른 시작

1. 기본 경로 생성

import seavoyage as sv

# 출발지와 도착지 좌표 (경도, 위도)
start = (129.17, 35.075)
end = (-4.158, 44.644)

# 기본 해상 네트워크에서 최적 경로 탐색
route = sv.seavoyage(start, end)
print("경로 길이:", route["properties"]["length"], "km")
print("예상 소요 시간:", route["properties"]["duration_hours"], "시간")

2. 커스텀 제한구역(해역) 적용

# 제한구역 GeoJSON 파일 등록 (예: 'jwc.geojson')
sv.register_custom_restriction('jwc', '/path/to/jwc.geojson')

# 제한구역을 적용하여 경로 탐색
route = sv.seavoyage(start, end, restrictions=['jwc'])
print("제한구역 적용 후 경로 길이:", route["properties"]["length"], "km")

3. 다양한 해상 네트워크 해상도 사용

3.1 미리 설정된 해상 네트워크 사용

# 5km, 10km, 20km, 50km, 100km 네트워크 지원
mnet_5km = sv.get_m_network_5km()
route = sv.seavoyage(start, end, M=mnet_5km)

3.2 사용자 정의 해상 네트워크 사용

# 사용자 정의 해상 네트워크 생성
mnet = sv.MNetwork().from_geojson('/path/to/mnet.geojson')
route = sv.seavoyage(start, end, M=mnet)

4. folium 기반 지도 시각화

from seavoyage.utils import map_folium

# folium 지도 객체로 변환
m = map_folium(route)
m.save("route_map.html")

주요 API

  • seavoyage(start, end, restrictions=None, M=None, ...) : 최적 경로 탐색 (제한구역, 네트워크 해상도 등 옵션 지원)
  • MNetwork : 해상 네트워크 객체 (노드/엣지 추가, GeoJSON 변환 등 지원)
  • register_custom_restriction(name, geojson_file_path) : 커스텀 제한구역 등록
  • list_custom_restrictions() : 등록된 제한구역 이름 목록 반환
  • get_custom_restriction(name) : 제한구역 객체 반환
  • map_folium(data, ...) : folium 기반 지도 시각화

라이선스

이 프로젝트는 Apache License 2.0 라이선스 하에 배포됩니다.

Copyright 2024 - Gent Halili (원작자)
Copyright 2025 - Byeonggong Hwang

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

기여

버그 리포트, 기능 제안, 풀 리퀘스트는 언제나 환영합니다.

연락처

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

seavoyage-0.1.15.tar.gz (32.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seavoyage-0.1.15-py3-none-any.whl (32.7 MB view details)

Uploaded Python 3

File details

Details for the file seavoyage-0.1.15.tar.gz.

File metadata

  • Download URL: seavoyage-0.1.15.tar.gz
  • Upload date:
  • Size: 32.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.0

File hashes

Hashes for seavoyage-0.1.15.tar.gz
Algorithm Hash digest
SHA256 bebaa34dee87e7e2162670cff01db223d59378cc1e2d0ecb7a60297502bac3e3
MD5 9b592defb898529ead3cc7a016475c94
BLAKE2b-256 1c0d224c3bb6439856728c1f8e94ec224acaa015304f78823d61a30ed18e6e80

See more details on using hashes here.

File details

Details for the file seavoyage-0.1.15-py3-none-any.whl.

File metadata

  • Download URL: seavoyage-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 32.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.0

File hashes

Hashes for seavoyage-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 e86078b07a85d3070e2432674248d90ab6244db790bb562e1fc846a0937a7492
MD5 da4bf016b93aee7efc1d59d8ce335d85
BLAKE2b-256 0fdbcba88a897bf1740b16bf693eadeda4ddebf79cc7a8e91b8314124da03f61

See more details on using hashes here.

Supported by

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