--- id: mgrs version: "1.5.4" license: The MIT License (MIT) Copyright (c) 2016 Howard Butler Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation… (full text in the JSON record) license_treatment: permissive maintenance: aging --- # mgrs — MGRS coordinate conversion for Python License: permissive · Maintenance: aging · Downloads: 269.6K/mo ## What it is and what it does mgrs is a Python wrapper around GeoTrans C code that handles bidirectional conversion between MGRS grid coordinates and decimal degree latitude/longitude. It provides methods to convert lat/lon pairs to MGRS strings, reverse that conversion, and handle degree-minute-second (DMS) format. The package bundles an internal copy of GeoTrans 2.4.2 files and exposes the conversion logic through a simple Python class. The library is designed for GIS and geospatial applications where military or scientific coordinate systems are needed. It has no runtime dependencies beyond Python itself, making it lightweight to integrate. Wheels are pre-built for Python 3.9–3.12 across Linux, macOS, and Windows architectures, reducing installation friction on common platforms. Use it for: - Convert GPS coordinates from a field survey to MGRS format for military or defense mapping applications. - Transform MGRS grid references back to decimal degrees for display on web maps or GIS software. - Batch process geographic data that mixes coordinate systems in geospatial data pipelines. - Parse and validate MGRS strings in location-based services or emergency response systems. - Convert between DMS (degrees-minutes-seconds) and decimal degree formats in surveying workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts between MGRS (Military Grid Reference System) coordinates and decimal degrees latitude/longitude using a ctypes wrapper around GeoTrans C code. Yes, if you need MGRS coordinate conversion in a Python GIS or geospatial application. The package is stable, permissively licensed, has no dependencies, and offers pre-built wheels for modern Python versions. Install friction is moderate due to compiled components, but that is typical for geospatial libraries. The aging maintenance status (192 days since last release) is acceptable for a mature, feature-complete library with no known vulnerabilities. ## Install pip install mgrs uv add mgrs poetry add mgrs ## Installing mgrs Before you install: Medium install friction due to compiled wheels for multiple platforms and Python versions (3.9–3.12). Package is aging but stable; last release 192 days ago with active repository (133 stars, last commit 2026-02-03). No runtime dependencies simplifies deployment. License in practice: MIT license (permissive) permits commercial and private use with minimal restrictions; attribution required but no copyleft obligations. Quickstart: import mgrs m = mgrs.MGRS() latitude, longitude = 42.0, -93.0 mgrs_string = m.toMGRS(latitude, longitude) print(mgrs_string) # '15TWG0000049776' coords = m.toLatLon(mgrs_string) print(coords) # (41.999997975127997, -93.000000000000014) Requires Python 3.9 or later; compiled wheels available for common platforms (Linux x86_64/aarch64, macOS, Windows) but may require build tools on unsupported architectures. Verify before relying: - Precision control via MGRSPrecision parameter mentioned in description but not detailed in fact sheet - Performance characteristics for large-scale coordinate batch conversions - Accuracy guarantees relative to official GeoTrans implementation ## Package facts - License: The MIT License (MIT) Copyright (c) 2016 Howard Butler Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: medium - Maintenance: aging - Downloads: 269.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags MGRS coordinate conversion, military grid reference system, lat lon to MGRS, decimal degrees conversion, geographic coordinate transformation, GIS coordinate systems, UTM to MGRS conversion, gis, coordinate-systems, geospatial [View on SkillFed](https://skillfed.io/packages/mgrs) · [View on PyPI](https://pypi.org/project/mgrs/)