parzer 0.5.0
CRAN release: 2026-11-06
BUG FIX
-
parse_lat()andparse_lon()(and the functions built on them) now returnNAwith a warning when minutes or seconds are not within 0/60, instead of silently converting them, e.g. “10°30,12345” (#60). Negative minutes or seconds, and a decimal degree or minute followed by another slot (e.g. “45.5 30”), now also giveNAwith a warning. A comma is a separator, not a decimal mark; this is now documented. -
parse_parts_lat()andparse_parts_lon()(andpz_degree(),pz_minute(),pz_second()) no longer lose the sign of values between -1 and 0: the sign now sits on the first non-zero part, e.g. -0.5 gives deg 0, min -30. They also no longer return 60 seconds, e.g. 10.35 is now 10 deg 21 min 0 sec, not 10 deg 20 min 60 sec. -
parse_llstr()now gives one clear warning (“could not split into latitude and longitude”) for each string it cannot split, and keeps the other rows. Before, each such string gave two confusing “no digits” warnings about an internal marker. - The warning text for an invalid letter after degrees uses plain ASCII quotes.
-
parse_lon_lat()andparse_hemisphere()now clean symbols like°the same wayparse_lat()andparse_lon()do (before, “40°25’” gave 40). - Small numeric inputs such as
1e-5are no longer misread as two slots, and a number too large for a double now givesNAwith a warning instead of shifting the other slots. -
parse_lon_lat()andparse_hemisphere()now accept numeric and integer inputs, as documented. -
parse_llstr()now returns NA for unrecognized formats instead of two empty strings. - Strings that cannot be converted (no digits, or more than 3 numeric slots) now give only one warning, with no spurious second range warning.
- Fixed undefined behaviour in
parse_parts_lat()andparse_parts_lon()when a value could not be parsed (NA was cast to an integer).
MINOR IMPROVEMENTS
- Faster parsing: the C++ code no longer uses regular expressions (
std::regex), numbers are read withstd::stodinstead of a new stream for each token, andparse_parts_*()no longer allocates an R list for each coordinate.parse_lat(),parse_lon(),parse_llstr()andparse_parts_lat()are about 9 to 12 times faster than in 0.4.4. - withr is no longer a required dependency (it moved to Suggests). The Windows-only
.Call()wrapper that forced the C locale (#31) is removed, because it only worked around astd::regexbug. -
parse_hemisphere()detects the sign of a value withstd::signbit()instead of converting it to a string. - Added performance tests (
bench) to detect slowdowns, and a larger test suite (about 98% coverage). - The use cases vignette now runs its sf and leaflet code only when both packages are installed.
- README: local coverage badge, and installation with
pak::pkg_install().
parzer 0.4.2
CRAN release: 2025-05-19
parzer 0.4.1
CRAN release: 2021-12-20
MINOR IMPROVEMENTS
- documentation and package description describe more clearly
parzercore objective of parsing messy coordinates in character strings to convert them to decimal numeric values. Suggestion and work by @robitalec
ACKNOWLEDGEMENTS CHANGES
- new contributors to the package: @robitalec, @maelle and @yutannihilation
- new maintainer: @AlbanSagouis
parzer 0.4.0
CRAN release: 2021-02-16
MINOR IMPROVEMENTS
- performance improvement for internal function
scrub(), used in most exported functions in parzer (#30) work by @AlbanSagouis - work around for non-UTF8 MBCS locales: now all exported functions go through a modified
.Call()in which we usewithr::with_locale()if the user is on a Windows operating system (#31) (#32) work by @yutannihilation
parzer 0.3.0
CRAN release: 2020-10-13
BUG FIXES
- fix problem in
parse_llstr(): on older R versions wherestringsAsFactors=TRUEby default this function was returning strings as factors from an internal function that caused a problem in a subsequent step in the function (#29)
parzer 0.2.0
CRAN release: 2020-10-07
NEW FEATURES
- new contributor to the package @AlbanSagouis
- gains new function
parse_llstr()to parse a string that contains both latitude and longitude (#3) (#24) (#26) (#28) work by @AlbanSagouis
MINOR IMPROVEMENTS
- updated
scrub()internal function that strips certain characters to include more things to scrub (#25) work by @AlbanSagouis
parzer 0.1.4
CRAN release: 2020-03-29
MINOR IMPROVEMENTS
- add support to internal function for additional degree like symbols (#21)
- fix issue with
parse_parts_lat()/parse_parts_lon()functions where an NA was causing warnings on the cpp side; on cpp side, now check for NA and return list of NAs instead of NAs passing through other code (#23)
