Skip to content

Commit

Permalink
町字のマージパターン追加
Browse files Browse the repository at this point in the history
Closes #6
  • Loading branch information
keichan34 committed Dec 27, 2024
1 parent a1b146a commit eeb84c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/abr_mlit_merge_tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ export function createMergedApiData(abrData: SingleMachiAza[], mlitData: NlftpMl
const out = abrData;

for (const row of mlitData) {
// ABRデータに重複があるかのチェック
if (abrData.find(a => (
(a.oaza_cho === row.oaza_cho && a.chome === row.chome) ||
a.koaza === row.oaza_cho
(a.oaza_cho === row.oaza_cho && a.chome === row.chome) || // 大字と丁目が一致する場合
(a.koaza === row.oaza_cho) || // 小字が一致する場合
((a.oaza_cho || '') + (a.koaza || '') === row.oaza_cho) // 大字と小字を結合したものが一致する場合
))) {
continue;
}
Expand Down

0 comments on commit eeb84c5

Please sign in to comment.