({ bounds, filter, name, resolution, source })
| 139 | } |
| 140 | |
| 141 | async 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 | |
| 154 | async function createLandLayer({ bounds, name, resolution, source }) { |
| 155 | const inputFilePath = `${outputDirGeojson}/${name}_${resolution}m/countries.geojson`; |
no test coverage detected
searching dependent graphs…