@dra2020/baseclient 1.0.17 → 1.0.18

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.
@@ -1278,9 +1278,23 @@ var __importStar = (this && this.__importStar) || function (mod) {
1278
1278
  return result;
1279
1279
  };
1280
1280
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1281
- exports.geoIntersect = exports.geoIntersectOptions = exports.GeoMultiCollection = exports.geoMapEqual = exports.geoEqual = exports.geoTopoToCollection = exports.geoCollectionToTopo = exports.geoMapToCollection = exports.geoCollectionToMap = void 0;
1281
+ exports.geoIntersect = exports.geoIntersectOptions = exports.GeoMultiCollection = exports.geoMapEqual = exports.geoEqual = exports.geoTopoToCollection = exports.geoCollectionToTopo = exports.geoMapToCollection = exports.geoCollectionToMap = exports.geoEnsureID = void 0;
1282
1282
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
1283
1283
  const Poly = __importStar(__webpack_require__(/*! ../poly/all */ "./lib/poly/all.ts"));
1284
+ function geoEnsureID(col) {
1285
+ let prop;
1286
+ const props = ['id', 'GEOID', 'GEOID10', 'GEOID20', 'GEOID30'];
1287
+ if (col && col.features && col.features.length > 0) {
1288
+ let f = col.features[0];
1289
+ if (f.properties.id !== undefined)
1290
+ return;
1291
+ props.forEach(p => { if (prop === undefined && f.properties[p] !== undefined)
1292
+ prop = p; });
1293
+ if (prop)
1294
+ col.features.forEach(f => { f.properties.id = f.properties[prop]; });
1295
+ }
1296
+ }
1297
+ exports.geoEnsureID = geoEnsureID;
1284
1298
  function geoCollectionToMap(col) {
1285
1299
  if (col == null)
1286
1300
  return null;