mirror of
https://github.com/CIMEngine/cimengine-build-tools.git
synced 2025-02-20 19:33:12 +03:00
feat: check countries polygons
This commit is contained in:
parent
0431260e02
commit
b6fa1f5d3d
3 changed files with 12 additions and 3 deletions
|
@ -42,6 +42,15 @@ for (country of layers) {
|
|||
)
|
||||
);
|
||||
|
||||
co_features.features = co_features.features.map((val) => {
|
||||
if (val.geometry.type == "Polygon") {
|
||||
val.properties = {};
|
||||
} else if (val.geometry.type == "MultiPolygon") {
|
||||
console.error("Error: MultiPolygons are not allowed!");
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(geofixConf.countries, `${country}.geojson`),
|
||||
JSON.stringify(co_features, null, " ")
|
||||
|
|
Loading…
Add table
Reference in a new issue