From 571ff53b332a0fbfa1af5f93b53428ef07f98d69 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 11 Nov 2021 05:29:03 +1300 Subject: [PATCH] feat(layers): map PCLIX feature code to dependency (#403) --- lib/streams/layerMappingStream.js | 1 + test/streams/layerMappingStreamTest.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/streams/layerMappingStream.js b/lib/streams/layerMappingStream.js index a7d30bc..b19f4cb 100644 --- a/lib/streams/layerMappingStream.js +++ b/lib/streams/layerMappingStream.js @@ -6,6 +6,7 @@ function featureCodeToLayerDefault(featureCode) { case 'PCLI': return 'country'; case 'PCLD': + case 'PCLIX': return 'dependency'; case 'ADM1': return 'region'; diff --git a/test/streams/layerMappingStreamTest.js b/test/streams/layerMappingStreamTest.js index 978eb64..89f33de 100644 --- a/test/streams/layerMappingStreamTest.js +++ b/test/streams/layerMappingStreamTest.js @@ -24,6 +24,11 @@ tape('featureCodeToLayer', function(test) { t.end(); }); + test.test('PCLIX maps to dependency', function (t) { + t.equal(featureCodeToLayer('PCLIX'), 'dependency', 'Geonames PCLIX maps to dependency layer'); + t.end(); + }); + test.test('PCLD maps to dependency', function (t) { t.equal(featureCodeToLayer('PCLD'), 'dependency', 'Geonames PCLD maps to dependency layer'); t.end();