crskit
crskit is the Python package for crskit, Digi3D.AI's coordinate reference system (CRS) and coordinate transformation library. The open-source repository uses the Apache-2.0 license and is hosted at github.com/digi21/crskit.
From Python, it can:
- Create a CRS from an EPSG code or WKT (Well-Known Text, the standardized CRS description found in
.prjfiles). - Write CRS definitions in OGC WKT 1, ESRI WKT 1, WKT 2:2015 and WKT 2:2019.
- Transform coordinates between CRSs, including orthometric heights using a geoid model.
The API is in English, with snake_case functions, properties and arguments. Returned CRS and operation names come from the EPSG database in English.
crskit documentation
This section explains use with Digi3D.AI: its installed EPSG database, grid folder and specific codes. For package details, see repository documentation:
- Spanish tutorial: CRS concepts, axis order, WKT, operation selection, heights and geoids, and NumPy batch transformations.
- Python package README, in English: brief reference and grid download links.
- Runnable examples, in English.
Installation
Digi3D.AI does not distribute crskit: its installer does not copy the package, and the bundled interpreter lacks pip. Install in your own Python.
Requirements for PyPI (Python Package Index) version 0.6.0:
- Python 3.10 or later. Compiled packages are available for 64-bit Windows and Linux x86-64. Elsewhere,
pipbuilds from source, requiring a C++23 compiler and CMake. - NumPy 1.23 or later, only for
Transformation.transform_points. The remaining API works without NumPy.
To install:
Open a command window using the target Python installation.
Run:
pip install crskitCheck installation:
python -c "import crskit; print(crskit.is_initialized())"Prints
False: import succeeded but no EPSG database is initialized. See Initialization.
crskit does not contain the EPSG database. With Digi3D.AI installed, use its database. Otherwise also install crskit-epsg, containing the database:
pip install crskit[epsg]
For transform_points, also install NumPy:
pip install crskit[numpy]
Pages in this section
| Page | Contents |
|---|---|
| Initialization | Opening Digi3D.AI's EPSG database, grid folder and specific codes. |
| API reference | Module functions, classes, enumerations and exceptions. |
| Programming examples | Complete programs: UTM to geographic, UTM with Alicante height to ETRS89 3D, WKT and Digi3D.AI-specific codes. |
For .NET equivalents, see Digi21.CoordinateSystems.