kungfoo / geohash-java

Implementation of GeoHashes in java. We try to be/stay compliant to the spec, as far as possible.
Other
981 stars 310 forks source link

Expose validation-related constants in public API? #46

Closed m50d closed 4 years ago

m50d commented 4 years ago

Hi,

I'd like to use GeoHash.MAX_CHARACTER_PRECISION to validate my inputs ahead of calling withCharacterPrecision (rather than catching an exception and parsing the error message from there). Although I can copy the value into my own code, it would be clearer to use the library constant directly. Would it make sense for this (and MAX_BIT_PRECISION or any similar constant) to be public?

(Happy to submit a PR, but it's a trivial change).

Many thanks, Mickey

kungfoo commented 4 years ago

Yep, makes sense. I will make those changes.

On Tue, May 26, 2020, 08:52 Mickey Donaghy notifications@github.com wrote:

Hi,

I'd like to use GeoHash.MAX_CHARACTER_PRECISION to validate my inputs ahead of calling withCharacterPrecision (rather than catching an exception and parsing the error message from there). Although I can copy the value into my own code, it would be clearer to use the library constant directly. Would it make sense for this (and MAX_BIT_PRECISION or any similar constant) to be public?

(Happy to submit a PR, but it's a trivial change).

Many thanks, Mickey

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kungfoo/geohash-java/issues/46, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAKAKB5V7P4RV6OJ5TM273RTNRKDANCNFSM4NKAZLHA .

kungfoo commented 4 years ago

Will release this as 1.5.0