Skip to content

Commit

Permalink
Merge pull request #161 from RedAuburn/0levelroof
Browse files Browse the repository at this point in the history
handle roof levels <=0
  • Loading branch information
StrandedKitty authored Aug 5, 2023
2 parents 3cc0351 + c86a67b commit 1f322df
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function getBuildingParams(

const roofParams = getRoofParams(tags);
const roofOrientation = getRoofOrientation(<string>tags['roofOrientation']);
const roofLevels = <number>tags.roofLevels ?? (roofParams.type === 'flat' ? 0 : 1);
const roofLevels = tags.roofLevels <= 0 ? 0.6 : <number>tags.roofLevels ?? (roofParams.type === 'flat' ? 0 : 1);
const roofDirection = <number>tags.roofDirection ?? null;
const roofAngle = <number>tags.roofAngle ?? null;
let roofHeight = <number>tags.roofHeight ?? (roofLevels * levelHeight);
Expand Down Expand Up @@ -100,4 +100,4 @@ export default function getBuildingParams(
buildingWindows: windows,
buildingFoundation: hasFoundation
};
}
}

0 comments on commit 1f322df

Please sign in to comment.