geocoder.js
Fast offline coarse Geocoder based on GeoNames data.
Usage
var geocoder = require('geocoder');
geocoder('Big Apple', function (location) {
console.log(location);
});
Install
npm install geocoder.js
Build Database
wget -q http://download.geonames.org/export/dump/countryInfo.txt -O ./node_modules/geocoder.js/data/geonames/countryInfo.txt && \
wget -q http://download.geonames.org/export/dump/cities1000.zip -O ./node_modules/geocoder.js/data/geonames/cities1000.zip && \
wget -q http://download.geonames.org/export/dump/alternateNames.zip -O ./node_modules/geocoder.js/data/geonames/alternateNames.zip && \
unzip ./node_modules/geocoder.js/data/geonames/cities1000.zip -d ./node_modules/geocoder.js/data/geonames/ && \
unzip ./node_modules/geocoder.js/data/geonames/alternateNames.zip -d ./node_modules/geocoder.js/data/geonames/ && \
rm ./node_modules/geocoder.js/data/geonames/*.zip && \
node ./node_modules/geocoder.js/data/build.js
License
MIT