Comments (5)
Well, the good news is that because MapQuest is an Nominatim instance, it's possible to do a straight replacement of https://github.com/jmathai/elodie/blob/master/elodie/geolocation.py#L102 with:
r = requests.get('https://nominatim.openstreetmap.org/reverse?%s' % urllib.urlencode(params))
(I assume the same is also true for lookup(name)
but I've not tried it.)
The bad news is Nominatim's usage policy. Specifically:
- No heavy uses (an absolute maximum of 1 request per second).
- Provide a valid HTTP Referer or User-Agent identifying the application (stock User-Agents as set by http libraries will not do).
Bulk Geocoding
As a general rule, bulk geocoding of larger amounts of data is not encouraged. If you have regular geocoding tasks, please, look into alternatives below. Smaller one-time bulk tasks may be permissible, if these additional rules are followed
- limit your requests to a single thread
- limited to 1 machine only, no distributed scripts (including multiple Amazon EC2 instances or similar)
- Results must be cached on your side. Clients sending repeatedly the same query may be classified as faulty and blocked.
I'm not entirely sure if this app would fall foul of these rules though.
from elodie.
As a mater of fact I'm looking into a cache
zingo@d793ce0
It seem to work but need a little cleanup like maybe you would like to set the distance for coordinate lookup reuse currently it's about 3km. And it saves the file to disk everytime an entry is added. Maybe it should not be saved at all? But lets have that discussions in it's own issue. I was planing on working on it a bit more before showing it as I just got i working but as the discussion above mention the need I just wanted to show it.
from elodie.
@edent This link works for me. https://developer.mapquest.com/plan_purchase/steps/business_edition/business_edition_free
Glad that Nominatim can be a drop in replacement. We can make the path configurable. I think this tool tends to fall within their requirements. When doing a mass import the number of calls may be around 1/second but it's also possible to throttle that. Once your initial import is done the remaining usage tends to be much more sparse.
@zingo that is brilliant. I've been wanting to add that in almost the same way you have. I would probably move it to the geolocation
module though. I'll create an issue for this and you can open a pull request once you're done :).
from elodie.
@jmathai thanks - the MapQuest site now seems to be working again :-)
from elodie.
from elodie.
Related Issues (20)
- ImportError: cannot import name 'Iterable' from 'collections' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/__init__.py) HOT 1
- Any tips and tricks on how to figure out why most of my pictures got discarded? HOT 1
- api key generation fails HOT 3
- keywords based dynamic albums HOT 1
- imghdr going away
- Crash on text file NOT containing us-ascii or utf-8 in first line
- feature: able to create symlinks instead of copying
- Calculate checksum of image without EXIF-data
- Unknown Location - invalid AppKey HOT 14
- Support a time offset in addition to absolute time
- ISO 8601 datetime without capitalising the rest of the filename? HOT 1
- Dockerfile no longer resolves to a valid url for Exiftool download
- Dockerfile no longer works with debian:jessie as the base
- Unexpected int returned instead of string from metadata[part] in filesystem.py HOT 1
- Will there be an official Elodie docker image published on the cloud (ie not the Dockerfile) ?
- Elodie not recognizing videos with the .mkv file extension HOT 2
- Feature request: support for NRW and RAF files
- config.ini ignored HOT 5
- Hard to tell what the problem is when there's errors importing files HOT 7
- Need to add a test: adding a file which is already in destination
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elodie.