@hebcal/geo-sqlite 5.7.0 → 5.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +13 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/geo-sqlite v5.7.0 */
1
+ /*! @hebcal/geo-sqlite v5.7.1 */
2
2
  import Database from 'better-sqlite3';
3
3
  import QuickLRU from 'quick-lru';
4
4
  import { Location, Locale } from '@hebcal/core';
@@ -511,7 +511,7 @@ function munge(s) {
511
511
  }
512
512
 
513
513
  // DO NOT EDIT THIS AUTO-GENERATED FILE!
514
- const version = '5.7.0';
514
+ const version = '5.7.1';
515
515
 
516
516
  const GEONAME_SQL = `SELECT
517
517
  g.name as name,
@@ -1044,13 +1044,18 @@ class GeoDb {
1044
1044
  }
1045
1045
  }
1046
1046
 
1047
+ /* eslint-disable no-multi-spaces */
1048
+
1047
1049
  const fcodeKeep = {
1048
- PPL: true, // populated place a city, town, village, or other agglomeration of
1049
- PPLA: true, // seat of a first-order administrative division seat of a first-order administrative division (PPLC takes precedence over PPLA)
1050
+ PPL: true, // populated place: a city, town, village, or other agglomeration of
1051
+ PPLA: true, // seat of a first-order administrative division (PPLC takes precedence over PPLA)
1050
1052
  PPLA2: true, // seat of a second-order administrative division
1051
1053
  PPLA3: true, // seat of a third-order administrative division
1052
1054
  PPLC: true, // capital of a political entity
1053
- PPLL: true, // populated locality an area similar to a locality but with a small
1055
+ // an area similar to a locality but with a small group of dwellings or other buildings
1056
+ PPLL: true, // populated locality
1057
+ // cities, towns, villages, or other agglomerations of buildings where people live and work
1058
+ PPLS: true, // populated places
1054
1059
  PPLX: true, // section of populated place
1055
1060
  STLMT: true, // israeli settlement
1056
1061
  };
@@ -1130,6 +1135,9 @@ async function buildGeonamesSqlite(opts) {
1130
1135
  };
1131
1136
  const minPopulation = opts.population;
1132
1137
  const citiesFilter = (a) => {
1138
+ if (!a[17]) {
1139
+ return false; // require a non-empty iana timezone id
1140
+ }
1133
1141
  const fcode = a[7];
1134
1142
  logger.debug(a[0], a[1], fcode);
1135
1143
  if (!fcodeKeep[fcode]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/geo-sqlite",
3
- "version": "5.7.0",
3
+ "version": "5.7.1",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal"
@@ -70,6 +70,6 @@
70
70
  "globals": "^16.5.0",
71
71
  "jsdoc": "^4.0.5",
72
72
  "jsdoc-to-markdown": "^9.1.3",
73
- "rollup": "^4.53.5"
73
+ "rollup": "^4.54.0"
74
74
  }
75
75
  }