diff --git a/scripts/mkGeolocationTable.py b/scripts/mkGeolocationTable.py index 5621746..c5125fd 100755 --- a/scripts/mkGeolocationTable.py +++ b/scripts/mkGeolocationTable.py @@ -52,7 +52,7 @@ def mkGeolocationTable(file=''): from geopy.exc import GeocoderServiceError ## constants - URL = 'https://photon.komoot.io/reverse?lon={lng:.3f}&lat={lat:.3f}&limit=5' + URL = 'https://photon.komoot.io/reverse?lon={lng:.3f}&lat={lat:.3f}&limit=10' NAMESPACES = {'sc3': 'http://geofon.gfz-potsdam.de/ns/seiscomp3-schema/0.7', 'qml': 'http://quakeml.org/xmlns/bed/1.2'} @@ -70,7 +70,7 @@ def mkGeolocationTable(file=''): # parse event.xml DOM = ET.parse(stdin).getroot() geolocator = Photon() - reverse_geolocate = RateLimiter(geolocator.reverse, min_delay_seconds=1) + reverse_geolocate = RateLimiter(geolocator.reverse, min_delay_seconds=2) # iterate over all events count = 0 @@ -88,7 +88,7 @@ def mkGeolocationTable(file=''): else: logging.info('Processing event {id}'.format(id=publicID)) try: - locations = reverse_geolocate("{lat:.3f}, {lng:.3f}".format(lat=lat, lng=lng),exactly_one=False,limit=5) + locations = reverse_geolocate("{lat:.3f}, {lng:.3f}".format(lat=lat, lng=lng),exactly_one=False,limit=10) except GeocoderServiceError: logging.warning('Reverse Geolocation failed. Skipping event.') continue