parzer
Parse geographic coordinates. Contribute to ropensci/parzer development by creating an account on GitHub.
A coordinate parser whose entire job is surviving how badly humans write latitude and longitude.
◆Recent moves
- 1y ago
Fixes dropped negative signs and mis-parsed E longitudes
Two parsing bugs of the worst kind for this package: a leading space could make a negative sign disappear, and an E in a longitude string returned NA where W parsed correctly. Both produce wrong coordinates rather than errors. The release also trims dependencies and rewrites C++ hot paths to assign directly instead of pushing back.
View source ↗ - 4y ago
Scope clarified: parsing, not coordinate validation
Documentation-only, but it settles a recurring misunderstanding by stating that the package parses varied coordinate formats and does not exist to validate them. A new maintainer takes over in the same release.
View source ↗ - 5y ago
Faster scrub(); works around non-UTF8 locales on Windows
Speeds up the internal scrubbing function used by nearly every exported function, and routes calls through a locale-adjusted path so Windows users on non-UTF8 MBCS locales get correct results. Locale-dependent parsing failures are hard for users to diagnose, which makes this more valuable than its size suggests.
View source ↗ - 5y ago
Fixes factor conversion in parse_llstr() on older R
A single fix for older R versions where stringsAsFactors defaulted to TRUE and broke an internal step. No effect on current R installations.
View source ↗ - 5y ago
parse_llstr() parses latitude and longitude from one string
Adds the function for the most common real-world case — a single string containing both coordinates — which previously required splitting by hand. The scrub() character set was widened at the same time.
View source ↗ - 6y ago
More degree symbols recognised; NA handling fixed in C++
Widens the set of degree-like symbols the parser accepts and stops NAs from generating warnings on the C++ side. Routine additions to the long tail of formats the package tolerates.
View source ↗