Add intelligent station name processor
This is intended to replace the simple regex truncation (`city.match(/[^,/;\\-]*/)[0].substr(0, 12)`) with a file that has all the station name processing already pre-processed by the logic in the stations post-processor script. It uses priority-based conflict resolution to avoid duplicate station names by using airport classification hierarchy. It handles complex naming patterns including military facilities, county airports, hyphenated cities, slash/comma separators, and "at/near" qualifiers with a minium number of exceptions. This changes station data pipeline to generate stations-raw.json first, then process through the post-processor to create the final stations.json compatible with existing codebase.
This commit is contained in:
parent
c3d863f89f
commit
eb412a0cae
4 changed files with 19682 additions and 16129 deletions
16130
datagenerators/output/stations-raw.json
Normal file
16130
datagenerators/output/stations-raw.json
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
1247
datagenerators/stations-postprocessor.mjs
Normal file
1247
datagenerators/stations-postprocessor.mjs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -54,7 +54,7 @@ for (let i = 0; i < chunkStates.length; i += 1) {
|
|||
next = stations?.pagination?.next;
|
||||
round += 1;
|
||||
// write the output
|
||||
writeFileSync('./datagenerators/output/stations.json', JSON.stringify(output, null, 2));
|
||||
writeFileSync('./datagenerators/output/stations-raw.json', JSON.stringify(output, null, 2));
|
||||
}
|
||||
while (next && stations.features.length > 0);
|
||||
console.log(`Complete: ${state}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue