Releases: JonMcPherson/open-location-code
Releases · JonMcPherson/open-location-code
Version 2.1.1 - Fix encoding to allow code length of 2
NuGet Package Release: https://www.nuget.org/packages/OpenLocationCode/2.1.1
Release Notes
- Fix
codeLength
validation inEncode()
to allow length of 2 (previously minimum of 4) - Add more test cases for valid and invalid code lengths
Thanks @brewmanz
Version 2.1.0 - Fix Floating Point Precision Errors
NuGet Package Release: https://www.nuget.org/packages/OpenLocationCode/2.1.0
Release Notes
- Implemented a new algorithm for
Encode()
andDecode()
that uses 64-bit integer arithmetic to avoid floating point precision errors.- The original algorithm used floating point arithmetic which caused precision issues as discussed in Issue google/open-location-code#307.
- The
CodeArea
class was improved without any breaking changes- Added the
CodeLength
property as the length of the decoded Open Location Code. - Add new publicly accessible
GeoArea
class which now contains the generic area properties and methods and is extended by CodeArea. - The CodeArea constructor is still not publicly accessible to ensure that all CodeArea instances represent a valid OLC area.
- Added the
- The unit tests were improved to read and parse the test_data CSV files from the original open-location-code project.
- The
encoding.csv
anddecoding.csv
TestData files also include new test cases for these changes. - No unit tests or test cases were removed (only added).
- The
Version 2.0.0
NuGet Package Release: https://www.nuget.org/packages/OpenLocationCode/2.0.0
Release Notes:
- Now fully compliant with API spec through the static methods.
- Avoid throwing InvalidOperationException with improved class structure.
- OpenLocationCode class now only accepts valid full codes and the OpenLocationCode.ShortCode class was added for valid short codes.
- The
Shorten()
instance method returns a new ShortCode instance which has theRecoverNearest()
method to recover back to OpenLocationCode.
- Added
CodeDigits
property to OpenLocationCode class to get only the code digits as a more concise representation of the full code and can be passed to the constructor to be normalized back into a valid full code. - Removed the nonstandard
Parent()
method. - Fixed bug with validation of separator position (PR google/open-location-code#272)
- Fixed bug with validation of short codes with padding (Issue google/open-location-code#273)
- Renamed project directories to use dot
.
separator between namespaces likeOpenLocationCode.Test
- XML documentation comments were added and improved.
- Unit tests were added and improved.
- README was updated to include a description, usage, and link to API reference