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

빠른 시작

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.8rc1.tar.gz (9.7 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.8rc1-py3-none-any.whl (10.0 MB view details)

Uploaded Python 3

File details

Details for the file seavoyage-0.1.8rc1.tar.gz.

File metadata

  • Download URL: seavoyage-0.1.8rc1.tar.gz
  • Upload date:
  • Size: 9.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for seavoyage-0.1.8rc1.tar.gz
Algorithm Hash digest
SHA256 4ea1c5245f0a3100f91df8e13e4236417e423c1c9bcf1d60b1dbbb97bd514797
MD5 60626d895f06ae390f12cf61c73f3b6a
BLAKE2b-256 290063f0a9c696cb6b2345d0e75cbdfb66fc7b9fc21c2b77ef73ca4251e55432

See more details on using hashes here.

File details

Details for the file seavoyage-0.1.8rc1-py3-none-any.whl.

File metadata

  • Download URL: seavoyage-0.1.8rc1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for seavoyage-0.1.8rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 045c72f4e976246652d9b407dbcfa4444a63ee18c5fe7e3c8ea304d60711b520
MD5 dbc393aeb3708e86aa83db020fcf051e
BLAKE2b-256 3422c69107e4cf8e33c2d8192c7b9184049ef5ff3f6e1449be74200bc71358b1

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