Skip to content

Commit 1154ff1

Browse files
committed
Switch layer name to 'ocean'
1 parent e257b7b commit 1154ff1

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

tasks/topojson/config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const source = {
22
coastlines: 'GEOA_simplified',
33
countries: 'BNDA_simplified',
44
land: 'countries',
5-
oceans: 'GEOA_simplified',
5+
ocean: 'GEOA_simplified',
66
waterbodies: 'WBYA_simplified'
77
};
88

tasks/topojson/process_geodata.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ async function createCoastlinesLayer({ bounds, name, source }) {
114114
}
115115
}
116116

117-
async function createOceansLayer({ bounds, name, source }) {
118-
console.log(`Building oceans layer for '${name}'`);
117+
async function createOceanLayer({ bounds, name, source }) {
118+
console.log(`Building ocean layer for '${name}'`);
119119
for (const resolution of resolutions) {
120120
const inputFilePath = `./tasks/topojson/world_rectangle.geojson`;
121-
const outputFilePath = `${outputDirGeojson}/${name}_${resolution}m/oceans.geojson`;
122-
const eraseFilePath = `${outputDirGeojson}/${source.oceans}.geojson`;
121+
const outputFilePath = `${outputDirGeojson}/${name}_${resolution}m/ocean.geojson`;
122+
const eraseFilePath = `${outputDirGeojson}/${source.ocean}.geojson`;
123123
const commands = `${inputFilePath} ${bounds.length ? `-clip bbox=${bounds.join(',')}` : ''} -erase ${eraseFilePath} -o ${outputFilePath}`;
124124
await mapshaper.runCommands(commands);
125125
}
@@ -165,7 +165,7 @@ for (const {
165165
await createCountriesLayer({ acceptedFeatures, excludedFeatures, name, source });
166166
await createLandLayer({ name, source });
167167
await createCoastlinesLayer({ bounds, name, source });
168-
await createOceansLayer({ bounds, name, source });
168+
await createOceanLayer({ bounds, name, source });
169169
await createWaterbodiesLayer({ bounds, name, source });
170170
}
171171

0 commit comments

Comments
 (0)