MCPcopy Create free account
hub / github.com/plotly/plotly.js / createCountriesLayer

Function createCountriesLayer

topojson/bin/process_geodata.mjs:141–152  ·  view source on GitHub ↗
({ bounds, filter, name, resolution, source })

Source from the content-addressed store, hash-verified

139}
140
141async function createCountriesLayer({ bounds, filter, name, resolution, source }) {
142 const inputFilePath = `${outputDirGeojson}/${unFilename}_${resolution}m/${source}.geojson`;
143 const outputFilePath = `${outputDirGeojson}/${name}_${resolution}m/countries.geojson`;
144 const commands = [
145 inputFilePath,
146 bounds.length ? `-clip bbox=${bounds.join(',')}` : '',
147 filter ? `-filter '${filter}'` : '',
148 `-o ${outputFilePath}`
149 ].join(' ');
150 await mapshaper.runCommands(commands);
151 addCentroidsToGeojson(outputFilePath);
152}
153
154async function createLandLayer({ bounds, name, resolution, source }) {
155 const inputFilePath = `${outputDirGeojson}/${name}_${resolution}m/countries.geojson`;

Callers 1

Calls 1

addCentroidsToGeojsonFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…