Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "gdalclip", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Clip geometries between two datasets while maintain the attributes from both", | ||
@@ -13,8 +13,3 @@ "main": "src/index.js", | ||
}, | ||
"keywords": [ | ||
"GIS", | ||
"GDAL", | ||
"geo", | ||
"clip" | ||
], | ||
"keywords": ["GIS", "GDAL", "geo", "clip"], | ||
"author": "Eduardo G. S. Pereira", | ||
@@ -21,0 +16,0 @@ "license": "ISC", |
@@ -48,11 +48,13 @@ const gdal = require('gdal'); | ||
const feature = new gdal.Feature(newLayer); | ||
feature.setGeometry(clipFeature); | ||
for (const column of layersColumns.datasetCut) { | ||
feature.fields.set(column, cutFeature.fields.get(column)); | ||
if (!clipFeature.isEmpty()) { | ||
const feature = new gdal.Feature(newLayer); | ||
feature.setGeometry(clipFeature); | ||
for (const column of layersColumns.datasetCut) { | ||
feature.fields.set(column, cutFeature.fields.get(column)); | ||
} | ||
for (const column of layersColumns.datasetBase) { | ||
feature.fields.set(column, baseFeature.fields.get(column)); | ||
} | ||
newLayer.features.add(feature); | ||
} | ||
for (const column of layersColumns.datasetBase) { | ||
feature.fields.set(column, baseFeature.fields.get(column)); | ||
} | ||
newLayer.features.add(feature); | ||
}); | ||
@@ -59,0 +61,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5749
89