coordshift 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,60 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
+ This project follows [Semantic Versioning](https://semver.org/).
7
+
8
+ ---
9
+
10
+ ## [Unreleased]
11
+
12
+ ---
13
+
14
+ ## [0.1.0] - 2026-03-28
15
+
16
+ Initial alpha release.
17
+
18
+ > **Alpha software.** Always verify converted coordinates against a trusted independent source.
19
+ > The authors provide no warranty and accept no liability for errors in conversion results.
20
+
21
+ ### Added
22
+
23
+ **Python library**
24
+
25
+ - `coordshift.core.convert()` — reads a CSV, reprojects coordinate columns, and returns a pandas DataFrame. Supports in-place replacement or new columns via `suffix`.
26
+ - `coordshift.core.transform_points()` — low-level list-to-list coordinate transform using `pyproj.Transformer` with `always_xy=True`.
27
+ - `coordshift.crs.resolve_crs()` — resolves EPSG codes, PROJ strings, and friendly preset names to a canonical CRS string.
28
+ - `coordshift.crs.search_crs()` — searches the preset catalog by keyword.
29
+ - `coordshift.crs.CRSError` — custom exception for unresolvable CRS inputs.
30
+ - `coordshift.io.read_csv()` / `write_csv()` — thin wrappers around pandas CSV I/O.
31
+ - `coordshift.io.detect_columns()` — auto-detects X/Y columns from common name patterns (lon, lat, easting, northing, x, y, etc.).
32
+ - `coordshift.presets.PRESETS` — built-in catalog of friendly name → EPSG mappings: WGS84, NAD83, Indiana East/West, Iowa North, Arizona East/Central/West, UTM zones 15–17N, Web Mercator.
33
+
34
+ **CLI** (`coordshift` entry point)
35
+
36
+ - `coordshift convert` — convert a CSV file from one CRS to another.
37
+ - `coordshift search` — search presets by keyword.
38
+ - `coordshift list-crs` — list all built-in presets.
39
+ - UTF-8 console output on Windows.
40
+ - Progress indication for large files (>10k rows).
41
+
42
+ **Browser app**
43
+
44
+ - `coordshift.html` — standalone single-file browser-based converter.
45
+ - CSV upload with automatic column detection.
46
+ - CRS search across a full NAD83(2011) State Plane, UTM, and geographic catalog.
47
+ - In-browser reprojection via proj4js (no server required, works offline).
48
+ - Leaflet map preview of converted points.
49
+ - CSV download.
50
+
51
+ **Developer tooling**
52
+
53
+ - `scripts/gen_nad83_2011_spcs_js.py` — fetches and formats the NAD83(2011) SPCS catalog as JSON.
54
+ - `scripts/merge_spcs_into_index.py` — embeds the generated JSON catalog into `coordshift.html`.
55
+
56
+ ### Design notes
57
+
58
+ - Original X/Y columns are always preserved in output. Converted values are written to new columns placed immediately after the originals (e.g. `lon` → `lon_converted`, `lat` → `lat_converted`).
59
+ - `--suffix` / `suffix=` controls the appended column name suffix; default is `_converted`.
60
+ - Same behaviour applies in `coordshift.html`: converted columns appear right after the originals in the downloaded CSV.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nick Fulton
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,14 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ recursive-include docs *.md
5
+ recursive-include tests *.py *.csv
6
+ prune venv
7
+ prune dist
8
+ prune .git
9
+ prune scripts
10
+ prune coordshift.egg-info
11
+ global-exclude *.pyc
12
+ global-exclude __pycache__
13
+ global-exclude .DS_Store
14
+ global-exclude *.egg-info
@@ -0,0 +1,242 @@
1
+ Metadata-Version: 2.4
2
+ Name: coordshift
3
+ Version: 0.1.0
4
+ Summary: Universal coordinate system conversion for CSV and tabular data
5
+ Author: Nick Fulton
6
+ License-Expression: MIT
7
+ Keywords: gis,coordinates,crs,projection,epsg,pyproj,survey,gnss
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Topic :: Scientific/Engineering :: GIS
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: pyproj>=3.5
18
+ Requires-Dist: pandas>=2.0
19
+ Requires-Dist: click>=8.0
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest>=7.0; extra == "dev"
22
+ Requires-Dist: ruff>=0.4; extra == "dev"
23
+ Requires-Dist: build>=1.0; extra == "dev"
24
+ Requires-Dist: twine>=4.0; extra == "dev"
25
+ Dynamic: license-file
26
+
27
+ # coordshift
28
+
29
+ > **⚠ Alpha software — use with caution**
30
+ >
31
+ > coordshift is in early development (pre-v1.0). APIs and output formats may change without notice.
32
+ > **Always verify converted coordinates against a trusted independent source before using them in any survey, legal, safety-critical, or production workflow.**
33
+ > The authors provide no warranty and accept no liability for errors in coordinate conversion results. Use at your own risk.
34
+
35
+ Universal coordinate system conversion for CSV and tabular data — built for GIS analysts, surveyors, and drone mapping workflows.
36
+
37
+ ## What it does
38
+
39
+ `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.
40
+
41
+ **CLI**
42
+
43
+ ```bash
44
+ coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --x lon --y lat
45
+ ```
46
+
47
+ **Python**
48
+
49
+ ```python
50
+ from coordshift import convert
51
+
52
+ df = convert("input.csv", from_crs="EPSG:4326", to_crs="EPSG:2965", x="lon", y="lat")
53
+ ```
54
+
55
+ **Browser**
56
+
57
+ Open `coordshift.html` in any modern browser — no install required.
58
+
59
+ ## Why this exists
60
+
61
+ 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.
62
+
63
+ ## What's included
64
+
65
+ - Convert any EPSG/PROJ CRS to any other
66
+ - Auto-detect common column names (lat, lon, x, y, easting, northing, etc.)
67
+ - Source and target CRS via EPSG code, PROJ string, or friendly preset name
68
+ - Preserve all columns in output — original X/Y columns are always kept
69
+ - Converted coordinates written to new columns placed immediately after the originals
70
+ - Customisable output column suffix (default `_converted`, e.g. `lon_converted`, `lat_converted`)
71
+ - CLI for one-off conversions
72
+ - Python API for scripting and pipelines
73
+ - Browser-based converter (`coordshift.html`) with map preview — works offline
74
+
75
+ ## Planned
76
+
77
+ - Vertical coordinate support (ellipsoidal ↔ orthometric, GEOID)
78
+ - Batch conversion across multiple files
79
+ - Output to GeoJSON or Shapefile
80
+
81
+ ## Installation
82
+
83
+ Install from source until the first PyPI release:
84
+
85
+ ```bash
86
+ git clone https://github.com/FultonGeo/coordshift.git
87
+ cd coordshift
88
+ pip install -e .
89
+ ```
90
+
91
+ Or, once published:
92
+
93
+ ```bash
94
+ pip install coordshift
95
+ ```
96
+
97
+ ## Usage
98
+
99
+ ### CLI
100
+
101
+ Basic conversion (original `lon`/`lat` columns are preserved; converted values go into `lon_converted`/`lat_converted` placed right after them):
102
+
103
+ ```bash
104
+ coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --x lon --y lat
105
+ ```
106
+
107
+ With output path:
108
+
109
+ ```bash
110
+ coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --x lon --y lat --out output.csv
111
+ ```
112
+
113
+ Custom column name suffix (produces `lon_proj`, `lat_proj` instead of the default `lon_converted`, `lat_converted`):
114
+
115
+ ```bash
116
+ coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --suffix _proj
117
+ ```
118
+
119
+ PROJ strings (use a single line on Windows, or wrap as your shell allows):
120
+
121
+ ```bash
122
+ coordshift convert input.csv \
123
+ --from "+proj=longlat +datum=WGS84" \
124
+ --to "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80" \
125
+ --x longitude --y latitude
126
+ ```
127
+
128
+ List presets and search CRS:
129
+
130
+ ```bash
131
+ coordshift list-crs
132
+ coordshift search "indiana east"
133
+ ```
134
+
135
+ ### Python API
136
+
137
+ ```python
138
+ from coordshift import convert, search_crs
139
+
140
+ df = convert(
141
+ "field_points.csv",
142
+ from_crs="EPSG:4326",
143
+ to_crs="EPSG:2965",
144
+ x="lon",
145
+ y="lat",
146
+ )
147
+ # df now has lon, lon_converted, lat, lat_converted (plus any other original columns)
148
+ df.to_csv("field_points_converted.csv", index=False)
149
+
150
+ results = search_crs("indiana east")
151
+ ```
152
+
153
+ See [docs/examples.md](docs/examples.md) for more detailed examples.
154
+
155
+ ### Browser app
156
+
157
+ Open `coordshift.html` in any modern browser (Chrome, Firefox, Edge, Safari). No server or internet connection required after the page loads. Features include:
158
+
159
+ - Upload a CSV and pick coordinate columns
160
+ - Search and select source/target CRS from a built-in catalog of State Plane zones, UTM, and common geographic systems
161
+ - Preview converted points on an interactive map
162
+ - Download the converted CSV
163
+
164
+ ## Project structure
165
+
166
+ ```text
167
+ coordshift/
168
+ ├── coordshift/ # Python package
169
+ │ ├── __init__.py # Public API
170
+ │ ├── core.py # Conversion (pyproj)
171
+ │ ├── cli.py # CLI (Click)
172
+ │ ├── io.py # CSV I/O, column detection
173
+ │ ├── crs.py # CRS resolution
174
+ │ └── presets.py # Friendly name → EPSG
175
+ ├── tests/
176
+ │ ├── test_core.py
177
+ │ ├── test_cli.py
178
+ │ ├── test_io.py
179
+ │ └── fixtures/
180
+ ├── docs/
181
+ │ └── examples.md
182
+ ├── scripts/ # Developer tooling (regenerate HTML catalog)
183
+ ├── coordshift.html # Standalone browser-based converter
184
+ ├── pyproject.toml
185
+ ├── README.md
186
+ └── LICENSE
187
+ ```
188
+
189
+ ## Development setup
190
+
191
+ ```bash
192
+ git clone https://github.com/FultonGeo/coordshift.git
193
+ cd coordshift
194
+ python -m venv venv
195
+ ```
196
+
197
+ Activate the virtual environment:
198
+
199
+ - **Windows (PowerShell):** `.\venv\Scripts\Activate.ps1`
200
+ - **macOS / Linux:** `source venv/bin/activate`
201
+
202
+ Then:
203
+
204
+ ```bash
205
+ pip install -e ".[dev]"
206
+ pytest
207
+ ```
208
+
209
+ Run the linter:
210
+
211
+ ```bash
212
+ ruff check coordshift/
213
+ ```
214
+
215
+ ## Dependencies
216
+
217
+ - [pyproj](https://pyproj4.github.io/pyproj/) — PROJ bindings
218
+ - [pandas](https://pandas.pydata.org/) — tabular data
219
+ - [click](https://click.palletsprojects.com/) — CLI
220
+
221
+ ## Contributing
222
+
223
+ Contributions welcome. Open an issue before large changes so direction stays aligned.
224
+
225
+ 1. Fork the repo
226
+ 2. Create a branch: `git checkout -b feature/my-feature`
227
+ 3. Commit and push
228
+ 4. Open a pull request
229
+
230
+ ## Disclaimer
231
+
232
+ 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.
233
+
234
+ ## License
235
+
236
+ MIT. See [LICENSE](LICENSE).
237
+
238
+ ## Author
239
+
240
+ Nick Fulton — geospatial work, FAA Part 107, drone and survey experience.
241
+
242
+ Repository: [FultonGeo/coordshift](https://github.com/FultonGeo/coordshift).
@@ -0,0 +1,216 @@
1
+ # coordshift
2
+
3
+ > **⚠ Alpha software — use with caution**
4
+ >
5
+ > coordshift is in early development (pre-v1.0). APIs and output formats may change without notice.
6
+ > **Always verify converted coordinates against a trusted independent source before using them in any survey, legal, safety-critical, or production workflow.**
7
+ > The authors provide no warranty and accept no liability for errors in coordinate conversion results. Use at your own risk.
8
+
9
+ Universal coordinate system conversion for CSV and tabular data — built for GIS analysts, surveyors, and drone mapping workflows.
10
+
11
+ ## What it does
12
+
13
+ `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.
14
+
15
+ **CLI**
16
+
17
+ ```bash
18
+ coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --x lon --y lat
19
+ ```
20
+
21
+ **Python**
22
+
23
+ ```python
24
+ from coordshift import convert
25
+
26
+ df = convert("input.csv", from_crs="EPSG:4326", to_crs="EPSG:2965", x="lon", y="lat")
27
+ ```
28
+
29
+ **Browser**
30
+
31
+ Open `coordshift.html` in any modern browser — no install required.
32
+
33
+ ## Why this exists
34
+
35
+ 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.
36
+
37
+ ## What's included
38
+
39
+ - Convert any EPSG/PROJ CRS to any other
40
+ - Auto-detect common column names (lat, lon, x, y, easting, northing, etc.)
41
+ - Source and target CRS via EPSG code, PROJ string, or friendly preset name
42
+ - Preserve all columns in output — original X/Y columns are always kept
43
+ - Converted coordinates written to new columns placed immediately after the originals
44
+ - Customisable output column suffix (default `_converted`, e.g. `lon_converted`, `lat_converted`)
45
+ - CLI for one-off conversions
46
+ - Python API for scripting and pipelines
47
+ - Browser-based converter (`coordshift.html`) with map preview — works offline
48
+
49
+ ## Planned
50
+
51
+ - Vertical coordinate support (ellipsoidal ↔ orthometric, GEOID)
52
+ - Batch conversion across multiple files
53
+ - Output to GeoJSON or Shapefile
54
+
55
+ ## Installation
56
+
57
+ Install from source until the first PyPI release:
58
+
59
+ ```bash
60
+ git clone https://github.com/FultonGeo/coordshift.git
61
+ cd coordshift
62
+ pip install -e .
63
+ ```
64
+
65
+ Or, once published:
66
+
67
+ ```bash
68
+ pip install coordshift
69
+ ```
70
+
71
+ ## Usage
72
+
73
+ ### CLI
74
+
75
+ Basic conversion (original `lon`/`lat` columns are preserved; converted values go into `lon_converted`/`lat_converted` placed right after them):
76
+
77
+ ```bash
78
+ coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --x lon --y lat
79
+ ```
80
+
81
+ With output path:
82
+
83
+ ```bash
84
+ coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --x lon --y lat --out output.csv
85
+ ```
86
+
87
+ Custom column name suffix (produces `lon_proj`, `lat_proj` instead of the default `lon_converted`, `lat_converted`):
88
+
89
+ ```bash
90
+ coordshift convert input.csv --from EPSG:4326 --to EPSG:2965 --suffix _proj
91
+ ```
92
+
93
+ PROJ strings (use a single line on Windows, or wrap as your shell allows):
94
+
95
+ ```bash
96
+ coordshift convert input.csv \
97
+ --from "+proj=longlat +datum=WGS84" \
98
+ --to "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80" \
99
+ --x longitude --y latitude
100
+ ```
101
+
102
+ List presets and search CRS:
103
+
104
+ ```bash
105
+ coordshift list-crs
106
+ coordshift search "indiana east"
107
+ ```
108
+
109
+ ### Python API
110
+
111
+ ```python
112
+ from coordshift import convert, search_crs
113
+
114
+ df = convert(
115
+ "field_points.csv",
116
+ from_crs="EPSG:4326",
117
+ to_crs="EPSG:2965",
118
+ x="lon",
119
+ y="lat",
120
+ )
121
+ # df now has lon, lon_converted, lat, lat_converted (plus any other original columns)
122
+ df.to_csv("field_points_converted.csv", index=False)
123
+
124
+ results = search_crs("indiana east")
125
+ ```
126
+
127
+ See [docs/examples.md](docs/examples.md) for more detailed examples.
128
+
129
+ ### Browser app
130
+
131
+ Open `coordshift.html` in any modern browser (Chrome, Firefox, Edge, Safari). No server or internet connection required after the page loads. Features include:
132
+
133
+ - Upload a CSV and pick coordinate columns
134
+ - Search and select source/target CRS from a built-in catalog of State Plane zones, UTM, and common geographic systems
135
+ - Preview converted points on an interactive map
136
+ - Download the converted CSV
137
+
138
+ ## Project structure
139
+
140
+ ```text
141
+ coordshift/
142
+ ├── coordshift/ # Python package
143
+ │ ├── __init__.py # Public API
144
+ │ ├── core.py # Conversion (pyproj)
145
+ │ ├── cli.py # CLI (Click)
146
+ │ ├── io.py # CSV I/O, column detection
147
+ │ ├── crs.py # CRS resolution
148
+ │ └── presets.py # Friendly name → EPSG
149
+ ├── tests/
150
+ │ ├── test_core.py
151
+ │ ├── test_cli.py
152
+ │ ├── test_io.py
153
+ │ └── fixtures/
154
+ ├── docs/
155
+ │ └── examples.md
156
+ ├── scripts/ # Developer tooling (regenerate HTML catalog)
157
+ ├── coordshift.html # Standalone browser-based converter
158
+ ├── pyproject.toml
159
+ ├── README.md
160
+ └── LICENSE
161
+ ```
162
+
163
+ ## Development setup
164
+
165
+ ```bash
166
+ git clone https://github.com/FultonGeo/coordshift.git
167
+ cd coordshift
168
+ python -m venv venv
169
+ ```
170
+
171
+ Activate the virtual environment:
172
+
173
+ - **Windows (PowerShell):** `.\venv\Scripts\Activate.ps1`
174
+ - **macOS / Linux:** `source venv/bin/activate`
175
+
176
+ Then:
177
+
178
+ ```bash
179
+ pip install -e ".[dev]"
180
+ pytest
181
+ ```
182
+
183
+ Run the linter:
184
+
185
+ ```bash
186
+ ruff check coordshift/
187
+ ```
188
+
189
+ ## Dependencies
190
+
191
+ - [pyproj](https://pyproj4.github.io/pyproj/) — PROJ bindings
192
+ - [pandas](https://pandas.pydata.org/) — tabular data
193
+ - [click](https://click.palletsprojects.com/) — CLI
194
+
195
+ ## Contributing
196
+
197
+ Contributions welcome. Open an issue before large changes so direction stays aligned.
198
+
199
+ 1. Fork the repo
200
+ 2. Create a branch: `git checkout -b feature/my-feature`
201
+ 3. Commit and push
202
+ 4. Open a pull request
203
+
204
+ ## Disclaimer
205
+
206
+ 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.
207
+
208
+ ## License
209
+
210
+ MIT. See [LICENSE](LICENSE).
211
+
212
+ ## Author
213
+
214
+ Nick Fulton — geospatial work, FAA Part 107, drone and survey experience.
215
+
216
+ Repository: [FultonGeo/coordshift](https://github.com/FultonGeo/coordshift).
@@ -0,0 +1,13 @@
1
+ """
2
+ coordshift — Universal coordinate system conversion for CSV and tabular data.
3
+
4
+ Basic usage:
5
+ from coordshift import convert
6
+ df = convert("input.csv", from_crs="EPSG:4326", to_crs="EPSG:2965", x="lon", y="lat")
7
+ """
8
+
9
+ from coordshift.core import convert
10
+ from coordshift.crs import resolve_crs, search_crs
11
+
12
+ __version__ = "0.1.0"
13
+ __all__ = ["convert", "resolve_crs", "search_crs"]