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 validLineFeatures = lineFeatures.filter((line) => {
|
||||
const coords = line.geometry.coordinates;
|
||||
return coords.length >= 4;
|
||||
});
|
||||
|
||||
const polygons = turf.polygonize(turf.featureCollection(validLineFeatures));
|
||||
const polygons = turf.polygonize(turf.featureCollection(lineFeatures));
|
||||
|
||||
let union: any[] = [];
|
||||
|
||||
|
|
Loading…
Reference in New Issue