Skip to content

Commit

Permalink
Updated data IO to local function get_inv_from_datadict for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
bacetiner committed Jan 24, 2024
1 parent 36f1350 commit 9f6c78d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions brails/workflow/NSIParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# Barbaros Cetiner
#
# Last updated:
# 01-19-2024
# 01-24-2024

import requests
import numpy as np
Expand Down Expand Up @@ -134,7 +134,7 @@ def get_nbi_data(box):
datadict[pt] = data['properties']
return datadict

def get_inv_from_datadict(datadict):
def get_inv_from_datadict(datadict,footprints):
# Create an STR tree for the building points obtained from NBI:
points = list(datadict.keys())
pttree = STRtree(points)
Expand Down Expand Up @@ -198,7 +198,7 @@ def get_inv_from_datadict(datadict):
datadict = get_nbi_data(bbox)

# Create a footprint-merged building inventory from extracted NBI data:
self.inventory = get_inv_from_datadict(datadict)
self.inventory = get_inv_from_datadict(datadict,footprints)

# Write the created inventory in R2D-compatible CSV format:
self.inventory.to_csv('inventory.csv', index=True, index_label='id')
Expand Down

0 comments on commit 9f6c78d

Please sign in to comment.