From 114295a24b08d13186edfb8fabaac4ea9aa16b01 Mon Sep 17 00:00:00 2001 From: bacetiner Date: Fri, 19 Jan 2024 16:13:54 -0800 Subject: [PATCH] NSIParser now includes comments for better readability --- brails/workflow/NSIParser.py | 234 ++++++++++++++++++++++------------- 1 file changed, 146 insertions(+), 88 deletions(-) diff --git a/brails/workflow/NSIParser.py b/brails/workflow/NSIParser.py index 99c7032..8fd5608 100644 --- a/brails/workflow/NSIParser.py +++ b/brails/workflow/NSIParser.py @@ -37,7 +37,7 @@ # Barbaros Cetiner # # Last updated: -# 01-18-2024 +# 01-19-2024 import requests import numpy as np @@ -52,96 +52,154 @@ def __init__(self): self.inventory = [] def GenerateBldgInventory(self,footprints): - minlat = footprints[0][0][1] - minlon = footprints[0][0][0] - maxlat = footprints[0][0][1] - maxlon = footprints[0][0][0] - for fp in footprints: - for vert in fp: - if vert[1]>maxlat: - maxlat = vert[1] - if vert[0]>maxlon: - maxlon = vert[0] - if vert[1]maxlat: + maxlat = vert[1] + if vert[0]>maxlon: + maxlon = vert[0] + if vert[1]