geohex

Last updated:

0 purchases

geohex Image
geohex Images
Add to Cart

Description:

geohex

GeoHex for Dart #

Implementation of geohex.org encoding for Dart language.
Usage #
Encoding example:
import 'package:geohex/geohex.dart';

main() {
//Location of Capetown
final geoHexCode = GeoHex.encode(-33.91522085, 18.3758784, 4); //OM4138
}

copied to clipboard
Decoding example:
import 'package:geohex/geohex.dart';

main() {
//Geocode of Capetown
final geoHexZone = GeoHex.decode('OM4138'); // instance of Zone with lat -33.91522085 lon 18.3758784 and level 4
}

copied to clipboard
Note #
This realisation has some difference with the original lib. It's location clamping. Original geohex.org uses double representation of lat'n'lon, so theoretically, it should take more precision etc. but in fact, it leads to errors.
Refer to this - decimal degrees, eight points after dot the should be enough for everything.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.