Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speedup lookup #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

speedup lookup #42

wants to merge 1 commit into from

Conversation

T0biii
Copy link
Member

@T0biii T0biii commented May 20, 2024

move time.sleep when geocode is used

try:
point = Point().from_string(address)
return point.latitude, point.longitude
except:
try:
return app.geocode(address).raw["lat"], app.geocode(address).raw["lon"]
time.sleep(1)
geocode = app.geocode(address)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also should use cache for this:
https://operations.osmfoundation.org/policies/nominatim/

Results must be cached on your side. Clients sending repeatedly the same query may be classified as faulty and blocked.

or setup a own instance of nominatim:
https://nominatim.org/release-docs/latest/admin/Installation/

@GoliathLabs GoliathLabs requested a review from awlx August 22, 2024 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant