GeohashInt class

Constructors

GeohashInt()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
maxPrecision int
The maximum precision allowed for this method of hashing.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

adjacent(int geohash, Direction direction) int
Returns a single neighbour of the given geohash in the direction. For diagonal directions, runs the processing twice.
bounds(int geohash) BoundsRecord
Returns a bounding box for a geohash as an annotated record.
decode(int geohash) → ({double lat, double lon})
Decodes a geohash to a (latitude, longitude) record. The result is the exact center of the bounding box for the geohash, returned by bounds function.
inherited
encode(double lat, double lon, int precision) int
Encode a latitude and longitude to a geohash string of given precision (that is, bit length). To match the precision of string-based geohashes, keep in mind that every character is 5 bits.
forBounds(double minLat, double minLon, double maxLat, double maxLon, int precision, {int limit = 10000}) List<int>
Returns a list of geohashes for the given bounding box. Those geohashes cover all four corners and everything inbetween. Adjust the limit to throw a TooManyGeohashesException when the bounds cover too many cells.
inherited
forCircle(double lat, double lon, double radius, int precision, {int limit = 10000, double latLimit = 86, bool asBox = false, bool precise = false}) List<int>
Returns a list of geohashes for a circle with a given centre location and a radius in meters. Assumes the latitude and longitude to be in EPSG:4326 projection. Will trim the circle if it goes outside the EPSG:3857 projection boundaries.
inherited
neighbours(int geohash) Map<Direction, int>
Returns all eight neighbours for the given geohash string. It does call adjacent eight times, so when you don't need every value, maybe you are better using that function. Although it's a little bit more efficient by not calculating an adjacent code twice for diagonal directions.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
precision(int geohash) int
Returns the precision of geohash.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited