Always retain KML lines and points
This commit is contained in:
1 parent
c0adc27cf5
commit
9b4ff9e188
3 files changed
+10
-5
No files matched your search
@@ -1013,12 +1013,13 @@ function normalizeKmlFiles(files) {
|
||||
const parcelSet = new Set(parcels);
|
||||
const sheetParts = polygonParts.filter(feature => !parcelSet.has(feature));
|
||||
const nonPolygonFeatures = features.filter(feature => geometryPolygons(feature.geometry).length === 0);
|
||||
const optionalFeatures = [...sheetParts, ...nonPolygonFeatures];
|
||||
if (!parcels.length && !(lmeState.includeKmlSheetLayer && optionalFeatures.length)) {
|
||||
const importedFeatures = [...parcels, ...nonPolygonFeatures];
|
||||
const optionalFeatures = sheetParts;
|
||||
if (!importedFeatures.length && !(lmeState.includeKmlSheetLayer && optionalFeatures.length)) {
|
||||
throw new Error("nessuna particella trovata; attiva 'includi layer del foglio' per importare gli altri elementi");
|
||||
}
|
||||
return {
|
||||
geojson: { type: "FeatureCollection", features: parcels },
|
||||
geojson: { type: "FeatureCollection", features: importedFeatures },
|
||||
sheetGeojson: {
|
||||
type: "FeatureCollection",
|
||||
features: lmeState.includeKmlSheetLayer ? optionalFeatures : []
|
||||
|
||||
Reference in new issue
Block a user