lat-lon-parser
Simple parser for latitude-longitude strings
What it is and what it does
lat-lon-parser is a lightweight coordinate parsing library that converts latitude-longitude strings from various textual formats into decimal degrees. It handles formats ranging from simple decimal notation (23.43) to complex degree-minute-second strings with cardinal directions (23° 25' 48.0" North), using a straightforward pattern-matching algorithm that assumes degrees, minutes, and seconds appear in sequence with optional quadrant indicators.
The package also provides conversion functions to transform between coordinate representations—converting decimal degrees to degree-minute or degree-minute-second tuples, and formatting coordinates as strings in different notations. It requires Python 3.9 or later and has no external dependencies, making it a self-contained utility suitable for GIS applications, data processing pipelines, or any tool that needs to normalize coordinate input from multiple sources.
Use it for:
- Parse user-supplied coordinate strings in web forms or APIs that accept multiple coordinate formats
- Normalize latitude-longitude data from diverse sources (GPS devices, maps, user input) into a standard decimal format
- Convert between coordinate representations for display or storage (e.g., show degrees-minutes-seconds to users, store as decimal)
- Process geographic datasets in pandas DataFrames where coordinate columns contain mixed or non-standard formats
- Build GIS tools or mapping applications that accept coordinates in human-readable degree-minute-second notation
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses latitude-longitude coordinate strings in multiple formats (decimal degrees, degrees-minutes, degrees-minutes-seconds) and converts between them.
Yes, if you need lightweight coordinate parsing without external dependencies. The package is stable, permissively licensed, and solves a specific problem well. However, dormant maintenance (no active development) means you should verify it handles your specific coordinate formats before relying on it in production; consider it a utility library rather than an actively supported tool.
Install
lat-lon-parser on PyPI
pip
pip install lat-lon-parseruv
uv add lat-lon-parserpoetry
poetry add lat-lon-parserInstalling lat-lon-parser
Before you install
No runtime dependencies and low install friction. Dormant maintenance status (643 days since last release) means no active development, but the package is marked Production/Stable and has received recent version updates.
License in practice
CC0 1.0 Universal places the code in the public domain with no restrictions on use, modification, or redistribution.
Quickstart
pip install lat-lon-parser
from lat_lon_parser import parse
result = parse("45° 12.6' W")
print(result) # -45.21
Requires Python 3.9 or later.
Verify before relying
- Whether the package handles edge cases like coordinates spanning the International Date Line or poles
- Performance characteristics when parsing very large coordinate datasets
- Whether format detection is truly robust across all claimed format combinations
Package facts
| License | CC0 1.0 Universal (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 643 days since the last release |
| First released | |
| Downloads | 138,635/month — #11,325 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: lat_lon_parser-1.3.1-py3-none-any.whl
Keywords: latitude, longitude, coordinates
Tags
More GIS packages
Shapely provides Python tools for creating,…
permissive · top 1,000 on PyPI
pyprojpyproj provides a Python interface to PROJ,…
permissive · top 1,000 on PyPI
geopandasGeoPandas extends pandas DataFrames to handle…
permissive · top 1,000 on PyPI
geopygeopy is a Python client for geocoding and…
permissive · top 5,000 on PyPI
pyogrioPyogrio provides fast, bulk-oriented read and…
permissive · top 5,000 on PyPI
h3h3 provides Python bindings to Uber's H3…
permissive · top 5,000 on PyPI
mgrsConverts between MGRS (Military Grid Reference…
permissive · top 15,000 on PyPI
convertbngConverts decimal WGS84 longitude/latitude…
unclear · top 15,000 on PyPI
pynmea2Parses and generates NMEA 0183 sentences from…
permissive · top 15,000 on PyPI
polylineEncodes and decodes geographic coordinate…
unclear · top 5,000 on PyPI
utmConverts between latitude/longitude coordinates…
permissive · top 5,000 on PyPI
reverse_geocoderReverse Geocoder converts latitude/longitude…
copyleft · top 15,000 on PyPI
geohash2Encodes latitude/longitude coordinates to…
agpl · top 5,000 on PyPI
reverse-geocodeReverse Geocode converts latitude/longitude…
copyleft · top 15,000 on PyPI
tzfpyConverts geographic coordinates…
permissive · top 5,000 on PyPI
suntimesCalculates sunrise and sunset times for any…
permissive · top 15,000 on PyPI