DenisCarriere / geocoder-geojson

Geocoding results in GeoJSON format
https://www.npmjs.com/package/geocoder-geojson
MIT License
21 stars 10 forks source link

Add OSM support (Nominatim) #4

Open terry90 opened 7 years ago

terry90 commented 7 years ago

Hi,

I would suggest the support of OpenStreetMap with Nominatim geocoder. http://wiki.openstreetmap.org/wiki/Nominatim

The limits are not so restrictive, it is about 1 request per sec. (useful for fallback)

https://wiki.openstreetmap.org/wiki/Nominatim_usage_policy

terry90 commented 7 years ago

I will work on it as soon as I have some spare time. (may take long)

DenisCarriere commented 7 years ago

@terry90 I very much agree 👍

You can use my previous Geocoder written in Python as reference.

https://github.com/DenisCarriere/geocoder/blob/master/geocoder/osm.py

The intent with this Javascript geocoder was really to make it as modular as possible, looking forward to merge your PR, don't worry if it's not the 100% solution, I'll help out to tidy it up.