proximity_hash 1.0.1 copy "proximity_hash: ^1.0.1" to clipboard
proximity_hash: ^1.0.1 copied to clipboard

outdated

Generate a set of geohashes that cover a circular area, given the center coordinates and the radius

example/main.dart

import 'package:proximity_hash/proximity_hash.dart';

// get all points within a certain radius

//points
void main() { 

  List<List<double>> points = [[48.864716,	2.349014],[48.864716,	3.349014],[58.864716,	2.349014]];

  //get geohashes within 5000 meter
  List<String> proximityGeohashes = createGeohashes(48.864716, 2.349014, 5000, 3);    
  for(var g in points) {
    if (proximityGeohashes.contains(convertToGeohash(0.0,0.0,g[0],g[1],3))){
      print('The coordinates ${g[0].toString()},${g[1].toString()} are within 5000 meters of 48.864716, 2.349014');
    }
  }
}
8
likes
0
points
97
downloads

Publisher

unverified uploader

Weekly Downloads

Generate a set of geohashes that cover a circular area, given the center coordinates and the radius

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dart_geohash

More

Packages that depend on proximity_hash