Remove filtering of line features based on coordinate length before polygonization
This commit is contained in:
parent
35ae88924d
commit
5369a97105
|
@ -27,12 +27,7 @@ async function getRoomsFromLines(lines: Types.RefLines) {
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
const lineFeatures = result.map(line => turf.lineString(line.map(p => p.position)));
|
const lineFeatures = result.map(line => turf.lineString(line.map(p => p.position)));
|
||||||
const validLineFeatures = lineFeatures.filter((line) => {
|
const polygons = turf.polygonize(turf.featureCollection(lineFeatures));
|
||||||
const coords = line.geometry.coordinates;
|
|
||||||
return coords.length >= 4;
|
|
||||||
});
|
|
||||||
|
|
||||||
const polygons = turf.polygonize(turf.featureCollection(validLineFeatures));
|
|
||||||
|
|
||||||
let union: any[] = [];
|
let union: any[] = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue