Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Urban Cooling errors on buildings vector emtpy geometry #1401

Closed
emlys opened this issue Sep 6, 2023 · 0 comments · Fixed by #1436
Closed

Urban Cooling errors on buildings vector emtpy geometry #1401

emlys opened this issue Sep 6, 2023 · 0 comments · Fixed by #1436
Labels
bug Something isn't working

Comments

@emlys
Copy link
Member

emlys commented Sep 6, 2023

A user reported an error that appears to result from features in the buildings vector having no geometry:

...
  File "natcap\invest\urban_cooling_model.py", line 942, in calculate_uhi_result_vector
  File "natcap\invest\urban_cooling_model.py", line 945, in <genexpr>
AttributeError: 'NoneType' object has no attribute 'ExportToWkb'

I don't think we have a consistent policy on whether to skip empty geometries or raise an error. But we do skip over them earlier on, in calculate_disjoint_polygon_set: WARNING no geometry in C:\Users\iecolab\Documents\Results_day\mod13\intermediate\reprojected_buildings_mod13_cooling.shp FID: 166750, skipping...

It's unfortunate to error so far along in the model run (in this user's case, after about 23 hours). It's probably best to just check for None geometries and skip over them.

https://community.naturalcapitalproject.org/t/error-running-urban-cooling-model-with-work-productivity-valuation/4053/2

@emlys emlys added the bug Something isn't working label Sep 6, 2023
emlys added a commit to emlys/invest that referenced this issue Oct 23, 2023
davemfish added a commit that referenced this issue Oct 24, 2023
UCM: skip building vector features with no geometry #1401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant