Skip to content

Commit

Permalink
feat(layers): map PCLIX feature code to dependency (pelias#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink authored Nov 10, 2021
1 parent ce8bac5 commit 571ff53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/streams/layerMappingStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function featureCodeToLayerDefault(featureCode) {
case 'PCLI':
return 'country';
case 'PCLD':
case 'PCLIX':
return 'dependency';
case 'ADM1':
return 'region';
Expand Down
5 changes: 5 additions & 0 deletions test/streams/layerMappingStreamTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 571ff53

Please sign in to comment.