From 10b93fea73d95ccd5d0fcb1a0366c4d65d8af079 Mon Sep 17 00:00:00 2001 From: Daniel Dupriest Date: Mon, 17 Jul 2023 16:47:54 -0700 Subject: [PATCH 1/2] Added instructions for suppressing data download. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8b5a8bc..5e4c93b 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,8 @@ geocoder.init({ dumpDirectory: '/tmp/geonames' }, function () { }); ``` +By default, data will be downloaded and cached on every start of the application, creating files such as `admin1CodesASCII_2023-07-17.txt` in the cache directory. If you wish to reuse the existing downloaded files, you can rename them to remove the date, such as `admin1CodesASCII.txt`, which will suppress the download. + ### Look Up ```javascript From 90338dd6f097cd97da5ea525f130f2a639e7200e Mon Sep 17 00:00:00 2001 From: Thomas Steiner Date: Tue, 18 Jul 2023 10:32:16 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5e4c93b..5bd7bf4 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ geocoder.init({}, function () { Optionally `init()` also allows you to specify which files to load data from. This reduces initialization time and the runtime memory footprint of the Node.js -process. By default all files are loaded. +process. By default, all files are loaded. ```javascript var geocoder = require('local-reverse-geocoder'); @@ -87,8 +87,6 @@ geocoder.init({ dumpDirectory: '/tmp/geonames' }, function () { }); ``` -By default, data will be downloaded and cached on every start of the application, creating files such as `admin1CodesASCII_2023-07-17.txt` in the cache directory. If you wish to reuse the existing downloaded files, you can rename them to remove the date, such as `admin1CodesASCII.txt`, which will suppress the download. - ### Look Up ```javascript @@ -383,9 +381,11 @@ npm install local-reverse-geocoder ## A Word on Data Freshness By default, the local [GeoNames dump](http://download.geonames.org/export/dump/) -data gets refreshed each day. You can override this behavior by removing the -timestamp from the files in the `./geonames_dump` download folder. If you don't -need admin1, admin2, admin3, admin4 or alternate names you can turn them off in +data gets refreshed each day, creating files such as +`admin1CodesASCII_YYYY-MM-DD.txt` in the cache directory. If you wish to reuse +the existing downloaded files, you can rename them to remove the date, such as +`admin1CodesASCII.txt`, which will suppress the download. If you don't +need admin1, admin2, admin3, admin4 or alternate names, you can turn them off in a manual init call and decrease load time. ## A Word on Memory Usage