pyGeoCOM
Python library for Leica GeoCOM Total Station communication
Overview
pyGeoCOM is a Python module designed to facilitate communication with Leica GeoCOM-compatible total stations. It provides a clean and modular interface to control total stations, perform measurements, and manage geodetic data efficiently.
Features
- Control Leica total stations via serial communication
- Support for various measurement modes and instrument settings
- Enum-based constants for clear and safe API usage
- Modular design with separated geodetic classes and communication logic
- Easily extendable for different Leica GeoCOM models
Implemented GeoCOM Commands
| Method | Command Format | Description |
|---|---|---|
do_measure(command, mode) |
%R1Q,2008:{command.value},{mode.value} |
Start measurement with mode and sensor program |
edm_laserpointer(state) |
%R1Q,1004:{state.value} |
Enable/disable laser pointer |
fine_adjust(hz_area, v_area) |
%R1Q,9037:{hz_area},{v_area},0 |
Perform fine adjustment |
get_angle1(mode) |
%R1Q,2003:{mode.value} |
Get complete angle measurement |
get_atm_correction() |
%R1Q,2029: |
Get atmospheric correction data |
get_edm_mode() |
%R1Q,2021: |
Get EDM measurement mode |
get_fine_adjust_mode() |
%R1Q,9030: |
Get fine adjustment mode |
get_incline_switch() |
%R1Q,2007: |
Get inclination switch status |
get_instrument_name() |
%R1Q,5004: |
Get instrument name |
get_instrument_number() |
%R1Q,5003: |
Get instrument number |
get_internal_temperature() |
%R1Q,5011: |
Get internal temperature |
get_prism_constant() |
%R1Q,2023: |
Get prism constant |
get_software_version() |
%R1Q,5034: |
Get software version |
get_simple_measurement(...) |
%R1Q,2108:{wait_time},{mode.value} |
Request simple measurement |
search_target() |
%R1Q,17020:0 |
Start target search |
set_atm_correction(atm) |
%R1Q,2028:{atm} |
Set atmospheric correction data |
set_fine_adjust_mode(adj_mode) |
%R1Q,9031:{adj_mode} |
Set fine adjustment mode |
set_incline_switch(state) |
%R1Q,2006:{state.value} |
Set inclination switch status |
set_telescope_position(...) |
%R1Q,9027:{direction},{zenith},{pos_mode},{atr_mode},0 |
Set telescope position |
set_telescope_to_second_face(...) |
%R1Q,9028:{pos_mode},{atr_mode},0 |
Set telescope to second face |
set_user_atr_state(state) |
%R1Q,18005:{state.value} |
Set user ATR state |
turn_off() |
%R1Q,112:0 |
Turn off instrument |
wake_up() |
%R1Q,18006:\r\n |
Wake up instrument |
High-Level Adapter Methods
The library provides additional high-level helper methods that simplify common TotalStation workflows such as positioning, atmospheric correction, and automated measurements.
Measure Current Target
measurement = ts.measure(
target_nr="P100",
atmo=atmo,
measure_time=datetime.now()
)
Starts a measurement cycle and automatically retries until a valid distance is returned.
Move Telescope to Target
ts.move_to(
target,
face=FaceDef.TMC_FACE_NORMAL
)
Moves the telescope to the specified target position. Second-face measurements are supported automatically.
Measure Target
measurement = ts.measure_target(
target,
atmospheric_data,
datetime.now()
)
Combines:
- telescope positioning
- atmospheric correction setup
- distance measurement
into a single high-level workflow.
Create Atmospheric Correction
atm = ts.create_atm_correction(atmospheric_data)
Creates GeoCOM-compatible atmospheric correction data from pressure and temperature values.
Installation
Install via pip:
pip install pygeocom
Metadata
Release files for pygeocom 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pygeocom-0.2.5.tar.gz | 21.2 kB | Without provenance | Details for pygeocom-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygeocom-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for pygeocom-0.2.5-py3-none-any.whl |
Total release size: 45.8 kB
Release files / pygeocom-0.2.5.tar.gz
| Download URL | pygeocom-0.2.5.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aac5db4dc6c6785a510347eafe3af7c91ab0fc07a22c634fd5114791c794d8ae
|
|
BLAKE2b-256 checksum How to use checksums |
07739680eab3918d9f27673856db3a180c2d7537646cac5ba705590650ed5a28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Release files / pygeocom-0.2.5-py3-none-any.whl
| Download URL | pygeocom-0.2.5-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7654debef40a47344bda69380bc6d7865858d62c62f0d6c83fe462f178a91d75
|
|
BLAKE2b-256 checksum How to use checksums |
d859d469a27675cc5d6b39ca32f60a1fb7b0ce1a2976c6ce93f54aef07c38b17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Security for pygeocom 0.2.5
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.