Giter Club home page Giter Club logo

Comments (5)

edent avatar edent commented on May 16, 2024

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.

zingo avatar zingo commented on May 16, 2024

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.

jmathai avatar jmathai commented on May 16, 2024

@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.

edent avatar edent commented on May 16, 2024

@jmathai thanks - the MapQuest site now seems to be working again :-)

from elodie.

ldexterldesign avatar ldexterldesign commented on May 16, 2024

👋 #258 (comment)

from elodie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.