mirror of
https://github.com/CIMEngine/cimengine-build-tools.git
synced 2024-11-22 04:06:20 +03:00
fix: real fix
This commit is contained in:
parent
14a250323d
commit
4c340926bf
3 changed files with 7 additions and 5 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "cimengine-build-tools",
|
"name": "cimengine-build-tools",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cimengine-build-tools",
|
"name": "cimengine-build-tools",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@turf/turf": "^6.5.0",
|
"@turf/turf": "^6.5.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cimengine-build-tools",
|
"name": "cimengine-build-tools",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"description": "Geojson data processing tools for CIMEngine",
|
"description": "Geojson data processing tools for CIMEngine",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -43,12 +43,14 @@ for (country of layers) {
|
||||||
);
|
);
|
||||||
|
|
||||||
co_features.features = co_features.features.map((val) => {
|
co_features.features = co_features.features.map((val) => {
|
||||||
if (val?.geometry?.type == "Polygon") {
|
if (val?.geometry?.type === "Polygon") {
|
||||||
val.properties = {};
|
val.properties = {};
|
||||||
} else if (val?.geometry?.type == "MultiPolygon") {
|
} else if (val?.geometry?.type === "MultiPolygon") {
|
||||||
console.error("Error: MultiPolygons are not allowed!");
|
console.error("Error: MultiPolygons are not allowed!");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return val;
|
||||||
});
|
});
|
||||||
|
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
|
|
Loading…
Add table
Reference in a new issue