Skip to main content

Universal coordinate system conversion for CSV and tabular data

Project description

coordshift

⚠ Alpha software — use with caution

coordshift is in early development (pre-v1.0). APIs and output formats may change without notice. Always verify converted coordinates against a trusted independent source before using them in any survey, legal, safety-critical, or production workflow. The authors provide no warranty and accept no liability for errors in coordinate conversion results. Use at your own risk.

Universal coordinate system conversion for CSV and tabular data — built for GIS analysts, surveyors, and drone mapping workflows.

What it does

coordshift reprojects coordinate columns in CSV files from one CRS to another, using any system supported by PROJ. It ships as both a command-line tool and a Python library, plus a standalone browser-based converter (coordshift.html) that works entirely offline.

CLI

coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --x lon --y lat

Python

from coordshift import convert

df = convert("input.csv", from_crs="EPSG:4326", to_crs="EPSG:2965", x="lon", y="lat")

Browser

Open coordshift.html in any modern browser — no install required.

Why this exists

Tools like cs2cs, ogr2ogr, and raw pyproj are powerful but assume you already speak PROJ. coordshift targets practitioners who need fast, repeatable conversions without wrestling with syntax.

What's included

  • Convert any EPSG/PROJ CRS to any other
  • Auto-detect common column names (lat, lon, x, y, easting, northing, etc.)
  • Source and target CRS via EPSG code, PROJ string, or friendly preset name
  • Preserve all columns in output — original X/Y columns are always kept
  • Converted coordinates written to new columns placed immediately after the originals
  • Customisable output column suffix (default _converted, e.g. lon_converted, lat_converted)
  • CLI for one-off conversions
  • Python API for scripting and pipelines
  • Browser-based converter (coordshift.html) with map preview — works offline

Planned

  • Vertical coordinate support (ellipsoidal ↔ orthometric, GEOID)
  • Batch conversion across multiple files
  • Output to GeoJSON or Shapefile

Installation

Install from PyPI (Python 3.10+):

pip install coordshift

From source (for development or unreleased changes):

git clone https://github.com/FultonGeo/coordshift.git
cd coordshift
pip install -e .

Usage

CLI

Basic conversion (original lon/lat columns are preserved; converted values go into lon_converted/lat_converted placed right after them):

coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --x lon --y lat

With output path:

coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --x lon --y lat --out output.csv

Custom column name suffix (produces lon_proj, lat_proj instead of the default lon_converted, lat_converted):

coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --suffix _proj

PROJ strings (use a single line on Windows, or wrap as your shell allows):

coordshift convert input.csv \
  --from "+proj=longlat +datum=WGS84" \
  --to "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80" \
  --x longitude --y latitude

List presets and search CRS:

coordshift list-crs
coordshift search "indiana east"

Python API

from coordshift import convert, search_crs

df = convert(
    "field_points.csv",
    from_crs="EPSG:4326",
    to_crs="EPSG:2965",
    x="lon",
    y="lat",
)
# df now has lon, lon_converted, lat, lat_converted (plus any other original columns)
df.to_csv("field_points_converted.csv", index=False)

results = search_crs("indiana east")

See docs/examples.md for more detailed examples.

Browser app

Open coordshift.html in any modern browser (Chrome, Firefox, Edge, Safari). No server or internet connection required after the page loads. Features include:

  • Upload a CSV and pick coordinate columns
  • Search and select source/target CRS from a built-in catalog of State Plane zones, UTM, and common geographic systems
  • Preview converted points on an interactive map
  • Download the converted CSV

Project structure

coordshift/
├── coordshift/         # Python package
│   ├── __init__.py    # Public API
│   ├── core.py        # Conversion (pyproj)
│   ├── cli.py         # CLI (Click)
│   ├── io.py          # CSV I/O, column detection
│   ├── crs.py         # CRS resolution
│   └── presets.py     # Friendly name → EPSG
├── tests/
│   ├── test_core.py
│   ├── test_cli.py
│   ├── test_io.py
│   └── fixtures/
├── docs/
│   └── examples.md
├── scripts/           # Developer tooling (regenerate HTML catalog)
├── coordshift.html    # Standalone browser-based converter
├── pyproject.toml
├── README.md
└── LICENSE

Development setup

git clone https://github.com/FultonGeo/coordshift.git
cd coordshift
python -m venv venv

Activate the virtual environment:

  • Windows (PowerShell): .\venv\Scripts\Activate.ps1
  • macOS / Linux: source venv/bin/activate

Then:

pip install -e ".[dev]"
pytest

Run the linter:

ruff check coordshift/

Dependencies

Contributing

Contributions welcome. Open an issue before large changes so direction stays aligned.

  1. Fork the repo
  2. Create a branch: git checkout -b feature/my-feature
  3. Commit and push
  4. Open a pull request

Disclaimer

coordshift is alpha software provided as-is, without warranty of any kind, express or implied. Coordinate conversion results depend on the accuracy of the underlying PROJ library, the correctness of the CRS definitions used, and the quality of the input data. Always double-check converted coordinates against an authoritative source before using them in any survey, engineering, legal, or safety-critical context. The authors and contributors are not responsible for errors, losses, or damages arising from the use of this software.

License

MIT. See LICENSE.

Author

Nick Fulton — geospatial work, FAA Part 107, drone and survey experience.

Links: PyPI · GitHub

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coordshift-0.1.2.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coordshift-0.1.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file coordshift-0.1.2.tar.gz.

File metadata

  • Download URL: coordshift-0.1.2.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coordshift-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4565a76a28080fc9c176ff2692291b6a4c1545452370bdf39d8d3910949b41c9
MD5 4d7d4bb026ba20f1df9af5e4b591dc5d
BLAKE2b-256 7fc502796fb2fe90bb16adcb8c41947cce70dea58b60a7dae3cd892a399cf584

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordshift-0.1.2.tar.gz:

Publisher: publish.yml on FultonGeo/coordshift

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coordshift-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: coordshift-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coordshift-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca42b52cbdab4d5ea6e947d70a15c09ee747aed7903b98548a274a47323c18fc
MD5 f91ce75a798d7a091c26e0150a649b75
BLAKE2b-256 a55dedbbfd2ce1853b158a472738c04293ed972a62d63a5e179ff01fb21632b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordshift-0.1.2-py3-none-any.whl:

Publisher: publish.yml on FultonGeo/coordshift

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page