pelias-deprecated / admin-lookup

A fast, local, streaming Quattroshapes administrative hierarchy lookup.
1 stars 0 forks source link

Migrate admin lookup config to a global setting #19

Closed missinglink closed 8 years ago

missinglink commented 9 years ago

Having per-import settings for enabling/disabling admin-lookups creates a messy/leaky abstraction, eg:

https://github.com/pelias/openstreetmap/blob/master/index.js#L30 https://github.com/pelias/geonames/blob/master/task/import.js#L117

It would be much nicer if this lib was responsible for enabling/disabling itself rather than giving that responsibility to it's caller.

In order to do this easily we will probably need to move to a 'global' setting rather than a per-import setting, however this is not really a problem as I found from using this setting that I've never needed to enable admin-lookup for one import while disabling it for another.

dianashk commented 8 years ago

We still need to allow each importer to indicate whether or not admin lookup is turned on, or at the very least be able to override it. We definitely should make sure the mechanism for doing so is consistent across all the importers.

dianashk commented 8 years ago

Closing as a dupe of pelias/pelias#255