Skip to main content

Coordinate Projector

security: bandit

This is the Norwegian Geotechnical Institute (NGI) Python package for projecting coordinates. It is a small shim on top of the library pyproj that again is an interface to PROJ.

References:

Latest releases see CHANGES.md

Installation (end user)

pip install coordinate-projector

Basic usage

Project a point

from coordinate_projector import Projector

projector = Projector()
 
from_srid = "4326"
to_srid = "3857"

# Paris Lat(48.8589506) Lon(2.2768485) EPSG:4326
from_east, from_north = 2.2768485, 48.8589506 

projected_east, projected_north = projector.transform(from_srid, to_srid, from_east, from_north)

# Paris Lat(6250962.06) Lon(253457.62) EPSG:3857 is in metres - 2D projection
assert abs(projected_east - 253457.62) <= 0.01
assert abs(projected_north - 6250962.06) <= 0.01 

print(f"{projected_east=}, {projected_north=}")
# projected_east=253457.6156334287, projected_north=6250962.062720417

Getting Started developing

  1. Software dependencies

    • Python 3.10 or higher
    • uv
    • Ruff code formatter
  2. Clone this repository

  3. Install

    uv sync --all-extras --dev

Build and Test

Run in the project root folder:

uv run pytest 

Build the package wheel:

uv build

Publish

Publish the package to PyPi:

uv publish --token ${PYPI_TOKEN}

TODOs

  • Handle lines
  • Handle polygons

Contribute

Please start by adding an issue before submitting any pull requests.

Metadata

Release files for coordinate-projector 0.0.15

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

Source distribution (sdist)

Source distribution for coordinate-projector 0.0.15
File Size Uploaded Provenance Actions
coordinate_projector-0.0.15.tar.gz 5.2 kB With provenance Details for coordinate_projector-0.0.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for coordinate-projector 0.0.15
File Interpreter ABI Platform Actions
coordinate_projector-0.0.15-py3-none-any.whl Python 3 none any Details for coordinate_projector-0.0.15-py3-none-any.whl

Total release size: 10.4 kB

Release files / coordinate_projector-0.0.15.tar.gz

Download URL coordinate_projector-0.0.15.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2cea9c415d891d86caf455dee0e8ff34e83b7a607409263e0e6903ae2c9b5129
BLAKE2b-256 checksum
How to use checksums
5cd22049b9365e2da56a68aa0b62435eed62763dc9df4c962436810115adad32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 1, 2025.

Transparency log

Release files / coordinate_projector-0.0.15-py3-none-any.whl

Download URL coordinate_projector-0.0.15-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6943f8eadf49355976027d87528c219dac2f3641aaf45ef5dfdc91fda7078f78
BLAKE2b-256 checksum
How to use checksums
0d7d83eb128e2bcfa2edcab15a39098022eaeee52b730d6a76ba62f0526c7497
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 1, 2025.

Transparency log

Security for coordinate-projector 0.0.15

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for coordinate_projector-0.0.15.tar.gz

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 1, 2025.

Transparency log

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