MCPcopy
hub / github.com/thampiman/reverse-geocoder / search

Function search

reverse_geocoder/__init__.py:283–293  ·  view source on GitHub ↗

Function to query for a list of coordinates

(geo_coords, mode=2, verbose=True)

Source from the content-addressed store, hash-verified

281 return _rg.query([geo_coord])[0]
282
283def search(geo_coords, mode=2, verbose=True):
284 """
285 Function to query for a list of coordinates
286 """
287 if not isinstance(geo_coords, tuple) and not isinstance(geo_coords, list):
288 raise TypeError('Expecting a tuple or a tuple/list of tuples')
289 elif not isinstance(geo_coords[0], tuple):
290 geo_coords = [geo_coords]
291
292 _rg = RGeocoder(mode=mode, verbose=verbose)
293 return _rg.query(geo_coords)
294
295if __name__ == '__main__':
296 print('Testing single coordinate through get...')

Callers 1

__init__.pyFile · 0.85

Calls 2

queryMethod · 0.95
RGeocoderClass · 0.85

Tested by

no test coverage detected