def get_nearest_points_dirty(self, center_point, radius, unit='<STR_LIT>'):
if unit == '<STR_LIT>':<EOL><INDENT>radius = utils.mi_to_km(radius)<EOL><DEDENT>grid_size = GEO_HASH_GRID_SIZE[self.precision]<EOL>if radius > grid_size / <NUM_LIT:2>:<EOL><INDENT>suggested_precision = <NUM_LIT:0><EOL>for precision, max_size in GEO_HASH_GRID_SIZE.items():<EOL><INDENT>if radius > max_size / <NUM_LIT:2>:<EOL><INDENT>suggested_precision = precision - <NUM_LIT:1><EOL>break<EOL><DEDENT><DEDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(suggested_precision)<EOL>)<EOL><DEDENT>me_and_neighbors = geohash.expand(self.get_point_hash(center_point))<EOL>return chain(*(self.data.get(key, []) for key in me_and_neighbors))<EOL>
return approx list of point from circle with given center and radius
it uses geohash and return with some error (see GEO_HASH_ERRORS)
:param center_point: center of search circle
:param radius: radius of search circle
:return: list of GeoPoints from given area