Author Topic: InventoryGenerator errors with geojson for location  (Read 14492 times)

sklepac

  • Newbie
  • *
  • Posts: 7
    • View Profile
InventoryGenerator errors with geojson for location
« on: March 29, 2023, 03:22:59 PM »
Hello, I am able to run InventoryGenerator with a string for location, but I get errors when using a geojson file for location. The geojson file contains building footprints obtained previously from OSM. InventoryGenerator only adds the first coordinate of each footprint to inventory['footprint'] and does not obtain any images, which causes errors. Please see input and output attached.

Thank you!

bacetiner

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: InventoryGenerator errors with geojson for location
« Reply #1 on: March 30, 2023, 05:20:30 AM »
Thank you for your post!

I am unable to reproduce this error. Can you please try re-installing BRAILS directly from the GitHub repo using the syntax pip install git+https://github.com/NHERI-SimCenter/BRAILS and see if the issue persists? I wonder if this is a bug that went unnoticed in the latest release (i.e., pip install BRAILS installs the latest release of BRAILS) but got addressed since then.

If you continue to experience this issue after installing directly from the GitHub repo, could you please share the GeoJSON file you are getting this error with? This way, I can take a deeper look into the problem.

I look forward to your response!

sklepac

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: InventoryGenerator errors with geojson for location
« Reply #2 on: March 30, 2023, 09:01:16 PM »
Thanks for the quick response!

I uninstalled BRAILS and re-installed from the GitHub repro as suggested. Now I am getting a slightly different error arising in the FootprintHandler. I have attached the Python output as well as an image here showing some debugging I tried, with references to FootprintHandler.py line numbers where the error arises. Hopefully that helps!

The GeoJSON file is too large to attach here (38205KB), but I have it saved on SharePoint here: https://uflorida-my.sharepoint.com/:u:/g/personal/sklepac_ufl_edu/Ed8PCxpsn69JhPthUy2FcjEBfDApVUuO4-l8SAu_k2IeEQ?e=S6xFkb

Please let me know if I can provide any more info.

Thank you!

bacetiner

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: InventoryGenerator errors with geojson for location
« Reply #3 on: May 06, 2023, 10:10:03 AM »
Apologies for the slow response; I saw this follow-up question just now!

You are seeing this error because there are a total of 11 invalid footprint geometries (in this case, multi polygons that are not nested) in the provided GeoJSON. Anytime FootprintHandler hits one of these geometries, it throws a fatal error. Please see attached images for five randomly selected samples from these invalid footprint geometries.

I pushed an update to FootprintHandler so that it successfully bypasses such footprint issues. Please let me know if you have any problems after updating your BRAILS setup to the latest.

On a side note, I see that this GeoJSON was generated using OSM. When I look at the current footprints for the 11 problematic locations in the provided GeoJSON, I currently see valid footprints. I wonder if this issue has to do with the way the footprints were extracted from OSM. If you can share more information on the specific process used to obtain these footprints, I might be able provide suggestions that may eliminate this type of footprint extraction issues.

sklepac

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: InventoryGenerator errors with geojson for location
« Reply #4 on: May 23, 2023, 07:09:31 PM »
Thanks for the reply! I think the OSM footprints problem arose because I was clipping the search boundary to 10km of the coastline and it may have cropped the polygons. I've changed the way I am getting footprints now, and it seems to be working.

Thanks for all the help!