Skip to main content

OpenSpeleoLib

OpenSpeleoLib reads, writes, validates, and converts cave-survey data.

GeoJSON conversion

Convert an Ariane TML survey with:

openspeleo convert -i survey.tml -o survey.geojson -f geojson

Shot colors

GeoJSON preserves recorded Ariane shot colors, with survey-color fallback for missing or invalid values. See shot-color export for the normalization, compatibility, and verification contract.

Coordinate validation

Ariane imports enforce the same constraints as the base survey models. Latitude must be between -90 and 90 degrees, longitude between -180 and 180 degrees, and both must be finite when provided. Invalid coordinates raise ValidationError during parsing, with notes identifying the section, station, shot ID, field, and supplied value. Comments are descriptive text; they never supply coordinates, UTM zones, or magnetic declination.

Run openspeleo validate_tml -i survey.tml to check structural/model validity. Run full conversion to check geographic consistency as well. See coordinate validation for diagnostics and the application integration contract.

Coordinate safety guard

A connected shot can contain both survey measurements and an explicit geographic endpoint. During GeoJSON conversion, explicit coordinates remain authoritative, but OpenSpeleoLib calculates where the shot should end from its length, depth, azimuth, unit, and magnetic declination. If the supplied and calculated endpoints differ by more than 500 metres, conversion raises InconsistentShotCoordinatesError.

For example, synthetic Shot ID 4242 with supplied coordinates (-70, 40) and a calculated endpoint near (40, -70) produces an error containing:

[Shot ID=4242]: Explicit coordinates are inconsistent with shot measurements

The 500-metre threshold is a fixed catastrophic-data guardrail, not a survey-quality or GPS-accuracy guarantee. Coordinates within the threshold are accepted without certifying their accuracy. Root anchors and connected anchors whose parents cannot be resolved cannot be compared and retain their existing behavior.

The library never swaps coordinates, guesses a correction, or emits a partially converted GeoJSON document. The CLI calculates and validates the complete document before opening the output path: a failed conversion does not create a new output and does not replace an existing output passed with --overwrite. Correct the source survey and run the conversion again.

Metadata

Release files for openspeleo-lib 0.0.21

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

Source distribution (sdist)

Source distribution for openspeleo-lib 0.0.21
File Size Uploaded
openspeleo_lib-0.0.21.tar.gz 37.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openspeleo-lib 0.0.21
File Interpreter ABI Platform
openspeleo_lib-0.0.21-py3-none-any.whl Python 3 none any Details

Total release size: 80.0 kB

Release files / openspeleo_lib-0.0.21.tar.gz

Download URL openspeleo_lib-0.0.21.tar.gz
Size 37.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4986c08ba7c8649629c4ddc033782132fd68aa2d0406a555a856e85ec5da502e
BLAKE2b-256 checksum
How to use checksums
661decb147438c5e9825e2e5745eb2f2201688b8220055ec846ba6bdd93cb451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / openspeleo_lib-0.0.21-py3-none-any.whl

Download URL openspeleo_lib-0.0.21-py3-none-any.whl
Size 43.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7855a5c9d9f43fde72b8ec10ec92af8c2690813afe37b99c304f55593ba3572
BLAKE2b-256 checksum
How to use checksums
255f981f3aa616ffc6863a35d40f507c653412fc49a3cc370bf874c5cab479b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.21 This release

2 release files

0.0.20

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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