Skip to main content

geokits

Professional geospatial and maritime computational utilities.

Built with Rust and PyO3 for Python 3.12+.

Installation

pip install maturin
maturin develop --release

Or build a wheel:

maturin build --release
pip install target/wheels/geokits-*.whl

Usage

import geokits

# 创建计算器:排水量(m³), 船长(m), 船宽(m), 吃水(m)
calc = geokits.NavCalc(
    displacement=50000.0,
    length=200.0,
    breadth=30.0,
    draught=10.0,
)

# 设置航速(节)和装载状态(True=满载,False=压载)
calc.setup(speed_kts=12.0, laden=True)

# 计算综合失速(节):风向角, 蒲福风级, 浪高, 浪向角
speed_loss = calc.compute(
    wind_beta=20.0,      # 风向角(度)
    wind_scale=6,        # 蒲福风级 0~12
    wave_height=4.0,     # 浪高(米)
    wave_beta=15.0,      # 浪向角(度)
)
print(f"失速: {speed_loss:.2f} 节")

API

geokits.NavCalc(displacement, length, breadth, draught)

创建船舶计算器实例。

参数 类型 说明
displacement float 排水量 (m³),必须 > 0
length float 船长 (m),必须 > 0
breadth float 船宽 (m),必须 > 0
draught float 吃水 (m),必须 > 0

NavCalc.setup(speed_kts, laden)

设置航速和装载状态,自动重新计算内部参数。

参数 类型 说明
speed_kts float 航速(节)
laden bool True 满载,False 压载

NavCalc.compute(wind_beta, wind_scale, wave_height, wave_beta) -> float

计算风浪综合失速值(节)。负值表示减速。

参数 类型 说明
wind_beta float 风向角(度)
wind_scale int 蒲福风级 0~12
wave_height float 浪高(米)
wave_beta float 浪向角(度)

Development

# 运行测试
cargo test

# 构建并安装到当前 Python 环境
maturin develop

Metadata

Release files for geokits 0.4.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for geokits 0.4.8
File Actions
geokits-0.4.8-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for geokits-0.4.8-cp312-cp312-win_amd64.whl
geokits-0.4.8-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details for geokits-0.4.8-cp312-cp312-manylinux_2_34_x86_64.whl
geokits-0.4.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details for geokits-0.4.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
geokits-0.4.8-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 Details for geokits-0.4.8-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Total release size: 951.8 kB

Release files / geokits-0.4.8-cp312-cp312-win_amd64.whl

Download URL geokits-0.4.8-cp312-cp312-win_amd64.whl
Size 122.8 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
59c2c411ba503d48bc7b3be399ece8417aee1a1b468c172ff67f7b81ddc4cad8
BLAKE2b-256 checksum
How to use checksums
861eb6a542fec3e94e69763389ab56d209cbc4bacc02955fdf45b3a8f739cfbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / geokits-0.4.8-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL geokits-0.4.8-cp312-cp312-manylinux_2_34_x86_64.whl
Size 224.5 kB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
51fb55ca8ece5d05fce6fddcfd05b53f246b719f188d5c17e36bd3c2ead33c6d
BLAKE2b-256 checksum
How to use checksums
6ddaf74ad5e346311bf46a66d83acce906be7a22ca494902907dc89d0f20d2d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / geokits-0.4.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL geokits-0.4.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 215.6 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
43e5ccd3bc1c616b8ec2e6d25cd0a50af7b554895963d11925ac3edbd1ea9d92
BLAKE2b-256 checksum
How to use checksums
e78146b66a832eea7aced1722d69792869c5e1b5bb17c82a86ae88f6ca9325b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / geokits-0.4.8-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL geokits-0.4.8-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 388.9 kB
Tags CPython 3.12 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a39694154620164442de376af1f025f599a20e8dcc35e5867583b4667e98176e
BLAKE2b-256 checksum
How to use checksums
e7e41e1156e52b833da160a608e6b0abd6994e056a5993603e137e4f237c10a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for geokits 0.4.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page