Skip to content

Commit 46ff17c

Browse files
authored
Merge pull request #3607 from architecture-building-systems/terrian-helper-fetch
Fetch terrain data from external source
2 parents 76f4773 + 8369a14 commit 46ff17c

36 files changed

Lines changed: 570 additions & 599 deletions

.github/workflows/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ jobs:
2828

2929
- name: Run tests
3030
shell: bash -l {0}
31-
run: cea test --workflow slow
31+
run: |
32+
cea test --type unittest
33+
cea test --type integration

.github/workflows/pull.request.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,6 @@ jobs:
6666

6767
- name: Run tests
6868
shell: bash -l {0}
69-
run: cea test --workflow quick
69+
run: |
70+
cea test --type unittest
71+
cea test --type integration

.github/workflows/setup_build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,13 @@ jobs:
114114
path: gui
115115
repository: architecture-building-systems/CityEnergyAnalyst-GUI
116116

117-
- uses: mamba-org/setup-micromamba@v1
118-
with:
119-
micromamba-binary-path: gui/dependencies/micromamba
117+
- name: Fetch micromamba
118+
run: |
119+
cd gui
120+
mkdir -p ./dependencies/arm64
121+
curl -Ls https://micro.mamba.pm/api/micromamba/osx-arm64/latest | tar -xvj -C ./dependencies/arm64 --strip-components=1 bin/micromamba
122+
mkdir -p ./dependencies/x64
123+
curl -Ls https://micro.mamba.pm/api/micromamba/osx-64/latest | tar -xvj -C ./dependencies/x64 --strip-components=1 bin/micromamba
120124
121125
- name: Save Apple API Key secret to file
122126
env:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- 2024-05-27 - 3.36.0 - #3586 Add nullable info for column schema
2+
- 2024-05-21 - 3.36.0 - #3584 Release 3.36.0
13
- 2024-05-16 - 3.35.6 - #3583 Use MKL for Windows to solve memory errors
24
- 2024-05-15 - 3.35.6 - #3574 Add trees as shading for radiation script
35
- 2024-05-14 - 3.35.6 - #3576 Consider adjacent walls by default

CREDITS.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
How to Cite
22
===========
33

4-
The CEA Team. (2024). City Energy Analyst (v3.36.0). Zenodo. https://doi.org/10.5281/zenodo.10950383
4+
The CEA Team. (2024). City Energy Analyst (v3.36.1). Zenodo. https://doi.org/10.5281/zenodo.11382063
55

66
The CEA team
77
============
@@ -11,6 +11,25 @@ and split into the categories of developers, product owner, project sponsor and
1111

1212

1313
<!-- credits -->
14+
- Version 3.36.1 - May 2024
15+
16+
Developers:
17+
* Reynold Mok
18+
* Martín Mosteiro Romero
19+
* Mathias Niffeler
20+
* Zhongming Shi
21+
22+
Product lead:
23+
* Zhongming Shi
24+
25+
Product sponsor:
26+
* [Arno Schlueter](https://systems.arch.ethz.ch/arno-schlueter)
27+
* [Toni Piëch Foundation](https://www.tonipiechfoundation.org/)
28+
29+
Others:
30+
* https://cityenergyanalyst.com/people
31+
32+
1433
- Version 3.36.0 - May 2024
1534

1635
Developers:

README.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
:alt: GitHub license
55
.. |repo_size| image:: https://img.shields.io/github/repo-size/architecture-building-systems/CityEnergyAnalyst
66
:alt: Repo Size
7-
.. |lines_of_code| image:: https://img.shields.io/tokei/lines/github/architecture-building-systems/CityEnergyAnalyst
8-
:alt: Lines of code
9-
.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.10950383.svg
10-
:target: https://doi.org/10.5281/zenodo.10950383
7+
.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.11382063.svg
8+
:target: https://doi.org/10.5281/zenodo.11382063
119

1210
.. image:: cea_logo.png
1311
:scale: 25 %
@@ -33,4 +31,4 @@ We invite all CEA users to get acquainted with the CEA Dashboard and CEA Console
3331
Cite us:
3432
--------
3533

36-
The CEA Team. (2024). City Energy Analyst (v3.36.0). Zenodo. https://doi.org/10.5281/zenodo.10950383
34+
The CEA Team. (2024). City Energy Analyst (v3.36.1). Zenodo. https://doi.org/10.5281/zenodo.11382063

bin/create_trace_graphviz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import yaml
1414
import cea.config
15-
from cea.tests.trace_inputlocator import create_graphviz_output
15+
from cea.utilities.trace_inputlocator.trace_inputlocator import create_graphviz_output
1616

1717
def main(config):
1818
with open(config.trace_inputlocator.yaml_output_file, 'r') as f:

cea/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.36.0"
1+
__version__ = "3.36.1"
22

33

44
class ConfigError(Exception):

cea/datamanagement/surroundings_helper.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import pandas as pd
1111
from geopandas import GeoDataFrame as gdf
1212
from geopandas.tools import sjoin as spatial_join
13+
from shapely import MultiPolygon
1314

1415
import cea.config
1516
import cea.inputlocator
@@ -35,7 +36,11 @@ def calc_surrounding_area(zone_gdf, buffer_m):
3536
:param float buffer_m: Buffer to add to zone building geometries
3637
:return: Surrounding area GeoDataFrame
3738
"""
38-
surrounding_area = gdf(geometry=[zone_gdf.geometry.buffer(buffer_m).unary_union], crs=zone_gdf.crs)
39+
merged_zone = zone_gdf.geometry.unary_union
40+
if isinstance(merged_zone, MultiPolygon):
41+
merged_zone = merged_zone.convex_hull
42+
43+
surrounding_area = gdf(geometry=[merged_zone.buffer(buffer_m)], crs=zone_gdf.crs)
3944
return surrounding_area
4045

4146

@@ -135,7 +140,6 @@ def erase_no_surrounding_areas(all_surroundings, zone, area_with_buffer):
135140
:return: GeoDataFrame with surrounding buildings
136141
"""
137142
buffer_polygon = area_with_buffer.to_crs(zone.crs).geometry.values[0]
138-
zone_area = gdf(geometry=[zone.geometry.unary_union], crs=zone.crs)
139143

140144
within_buffer = all_surroundings.geometry.intersects(buffer_polygon)
141145
surroundings = all_surroundings[within_buffer]
@@ -144,7 +148,7 @@ def erase_no_surrounding_areas(all_surroundings, zone, area_with_buffer):
144148
if not any([s_building_footprint.intersects(z_building_footprint)
145149
for z_building_footprint in zone.geometry])]
146150
footprints_gdf = gdf(geometry=footprints_without_overlaps, crs=surroundings.crs)
147-
relevant_surroundings = spatial_join(surroundings, footprints_gdf, op='within')
151+
relevant_surroundings = spatial_join(surroundings, footprints_gdf, predicate='within')
148152

149153
return relevant_surroundings.copy()
150154

@@ -175,8 +179,7 @@ def geometry_extractor_osm(locator, config):
175179
# get footprints of all the surroundings
176180
print("Getting building footprints")
177181
area_with_buffer_polygon = area_with_buffer.to_crs(get_geographic_coordinate_system()).geometry.values[0]
178-
all_surroundings = osmnx.geometries.geometries_from_polygon(polygon=area_with_buffer_polygon,
179-
tags={"building": True})
182+
all_surroundings = osmnx.features_from_polygon(polygon=area_with_buffer_polygon, tags={"building": True})
180183
all_surroundings = all_surroundings.to_crs(get_projected_coordinate_system(float(lat), float(lon)))
181184

182185
# erase overlapping area

0 commit comments

Comments
 (0)