Skip to main content

Python bindings for libosrm using pybind11

Project description

libosrmpy

OSRM(Open Source Routing Machine)을 Python에서 사용할 수 있도록 바인딩한 라이브러리입니다.

설치 방법

1. uv 설치

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

2. 라이브러리 설치

uv pip install path/to/libosrmpy-0.1.0-cp312-cp312-macosx_26_0_arm64.whl

서울 지역 지도 데이터 생성

OSRM에서 사용할 서울 지역 지도 데이터를 Docker를 사용하여 생성하는 방법입니다.

1. OSM 데이터 다운로드

curl -L -o seoul.osm.pbf http://download.geofabrik.de/asia/south-korea-latest.osm.pbf

Geofabrik에서 한국 전체 OSM 데이터를 다운로드합니다.

2. OSRM 데이터 처리

# Extract - OSM 데이터 추출
docker run -t --rm -v $(pwd):/data ghcr.io/project-osrm/osrm-backend:latest osrm-extract -p /opt/car.lua /data/seoul.osm.pbf


# Partition - 데이터 파티셔닝
docker run -t --rm -v $(pwd):/data ghcr.io/project-osrm/osrm-backend:latest osrm-partition /data/seoul.osrm

# Customize - 데이터 최적화
docker run -t --rm -v $(pwd):/data ghcr.io/project-osrm/osrm-backend:latest osrm-customize /data/seoul.osrm

3. run examples

uv run python3 examples/hello_libosrm.py 
uv pip install wheels/libosrmpy-*.whl --force-reinstall --no-deps; uv run pytest # force to re-install 

참고 사항

  • 프로파일 옵션
    • /opt/car.lua - 자동차
    • /opt/bicycle.lua - 자전거
    • /opt/foot.lua - 도보

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

libosrmpy-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

libosrmpy-0.1.0-cp312-cp312-manylinux_2_34_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

libosrmpy-0.1.0-cp312-cp312-macosx_26_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

File details

Details for the file libosrmpy-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for libosrmpy-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a37d519ba0178bd1f0f9568cec5c0cf1ccef5f4878f8705a4bfd3d95e7135fb4
MD5 ace15c8b6777eca37471f83e587f416a
BLAKE2b-256 da31fb868b15c220c2bc8cf3421c802eb02432d7eb1c2609b9f2d3ec751b1584

See more details on using hashes here.

File details

Details for the file libosrmpy-0.1.0-cp312-cp312-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for libosrmpy-0.1.0-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 417e084e06b4a2d7907e0fb4ab9019c8e91f82930dea56dc95ecc26d99851a3f
MD5 941005edf592ea7bd0018a2cfb0ea582
BLAKE2b-256 d5345210bff1ef1a304b9be0069f5a8700f4a3f88da4ca8f32cbe4810f699f2c

See more details on using hashes here.

File details

Details for the file libosrmpy-0.1.0-cp312-cp312-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for libosrmpy-0.1.0-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 dfc04ed38017a303a6b49a0a83eb4bdf6274e7193757889e0028ced1ff9c34be
MD5 2699bc29825ad9348280716817c5d596
BLAKE2b-256 0523c0030644842e2d0a94fe90c0185b2cb0f2d6368f8366cffab4fd1f1851de

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