Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2202df0
Add nullable info for column schema
reyery May 22, 2024
da0ab1a
Update schemas.yml
ShiZhongming May 22, 2024
93d2d98
Remove min value
reyery May 22, 2024
6c1ca77
Merge pull request #3586 from architecture-building-systems/fix-datab…
reyery May 27, 2024
b659a4d
Create release
reyery May 29, 2024
d2e0a23
Fetch micromamba for both mac arch
reyery May 29, 2024
5bdb18e
Update zenodo links
reyery May 29, 2024
2c13b14
Merge pull request #3595 from architecture-building-systems/release-3…
reyery May 29, 2024
55b5948
Move trace_inputlocator out of test folder
reyery May 30, 2024
7e2d4be
Remove invalid lines of code badge
reyery Jun 1, 2024
9469e31
Separate tests into unit and integration tests
reyery Jun 1, 2024
ab71381
Use threads instead of processes
reyery Jun 1, 2024
fd12a1d
Ensure temporary directory is deleted at exit
reyery Jun 1, 2024
dccaeab
Use singular instead of plural
reyery Jun 1, 2024
494c607
Remove the need for pickling schemas
reyery Jun 1, 2024
df77312
Use context manager to read schema file
reyery Jun 1, 2024
5fa56a8
Update cea test command
reyery Jun 3, 2024
50f24b7
Remove unused test script
reyery Jun 3, 2024
7c9736c
Fix some warnings
reyery Jun 3, 2024
f514a51
Update coordinate system functions
reyery Jun 3, 2024
46efc6e
Use WKT for CRS string format
reyery Jun 3, 2024
6fab664
Merge pull request #3599 from architecture-building-systems/3580-run-…
reyery Jun 4, 2024
805be6a
Add api marshalling as list
reyery Jun 4, 2024
4e891f2
Merge pull request #3602 from architecture-building-systems/fix-date-…
reyery Jun 4, 2024
c5115f6
Cleanup temporary directory when object is destroyed
reyery Jun 5, 2024
84f5896
Simplify getting building bounds
reyery Jun 7, 2024
24e59f8
Use generator for points
reyery Jun 7, 2024
2e7ee37
Store nodata value for elevation map
reyery Jun 7, 2024
a69bbf5
Add tolerance parameter
reyery Jun 7, 2024
185fa04
Remove unused parameter
reyery Jun 7, 2024
8cd2557
Take into account the grid size when checking bounds
reyery Jun 8, 2024
fb9e1d1
Use np.searchsorted to find relevant index
reyery Jun 8, 2024
65b4b3a
Check geometry bounds with elevation map
reyery Jun 8, 2024
eb7ab67
Reduce number of extra points considered
reyery Jun 8, 2024
584899c
Make sure that the scene is in projected crs
reyery Jun 8, 2024
605f328
Add more information regarding simplification level
reyery Jun 8, 2024
c45b047
Show reprojected crs
reyery Jun 8, 2024
e4c46c1
Rewrite terrain helper to fetch from terrain tiles
reyery Jun 10, 2024
fb3dc4c
Update docstring and typing
reyery Jun 10, 2024
62f0ed3
Standardise CRS
reyery Jun 10, 2024
4311124
Add buffer to bounds to ensure terrain overlap
reyery Jun 10, 2024
a1284f5
Add attribution to data
reyery Jun 11, 2024
3027a3c
Remove unused import
reyery Jun 11, 2024
ec7c390
Add tile information to references
reyery Jun 11, 2024
320d6bd
Add grid size as parametter
reyery Jun 11, 2024
8369a14
Update description
reyery Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ jobs:

- name: Run tests
shell: bash -l {0}
run: cea test --workflow slow
run: |
cea test --type unittest
cea test --type integration
4 changes: 3 additions & 1 deletion .github/workflows/pull.request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@ jobs:

- name: Run tests
shell: bash -l {0}
run: cea test --workflow quick
run: |
cea test --type unittest
cea test --type integration
10 changes: 7 additions & 3 deletions .github/workflows/setup_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,13 @@ jobs:
path: gui
repository: architecture-building-systems/CityEnergyAnalyst-GUI

- uses: mamba-org/setup-micromamba@v1
with:
micromamba-binary-path: gui/dependencies/micromamba
- name: Fetch micromamba
run: |
cd gui
mkdir -p ./dependencies/arm64
curl -Ls https://micro.mamba.pm/api/micromamba/osx-arm64/latest | tar -xvj -C ./dependencies/arm64 --strip-components=1 bin/micromamba
mkdir -p ./dependencies/x64
curl -Ls https://micro.mamba.pm/api/micromamba/osx-64/latest | tar -xvj -C ./dependencies/x64 --strip-components=1 bin/micromamba

- name: Save Apple API Key secret to file
env:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- 2024-05-27 - 3.36.0 - #3586 Add nullable info for column schema
- 2024-05-21 - 3.36.0 - #3584 Release 3.36.0
- 2024-05-16 - 3.35.6 - #3583 Use MKL for Windows to solve memory errors
- 2024-05-15 - 3.35.6 - #3574 Add trees as shading for radiation script
- 2024-05-14 - 3.35.6 - #3576 Consider adjacent walls by default
Expand Down
21 changes: 20 additions & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
How to Cite
===========

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

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


<!-- credits -->
- Version 3.36.1 - May 2024

Developers:
* Reynold Mok
* Martín Mosteiro Romero
* Mathias Niffeler
* Zhongming Shi

Product lead:
* Zhongming Shi

Product sponsor:
* [Arno Schlueter](https://systems.arch.ethz.ch/arno-schlueter)
* [Toni Piëch Foundation](https://www.tonipiechfoundation.org/)

Others:
* https://cityenergyanalyst.com/people


- Version 3.36.0 - May 2024

Developers:
Expand Down
8 changes: 3 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
:alt: GitHub license
.. |repo_size| image:: https://img.shields.io/github/repo-size/architecture-building-systems/CityEnergyAnalyst
:alt: Repo Size
.. |lines_of_code| image:: https://img.shields.io/tokei/lines/github/architecture-building-systems/CityEnergyAnalyst
:alt: Lines of code
.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.10950383.svg
:target: https://doi.org/10.5281/zenodo.10950383
.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.11382063.svg
:target: https://doi.org/10.5281/zenodo.11382063

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

The CEA Team. (2024). City Energy Analyst (v3.36.0). Zenodo. https://doi.org/10.5281/zenodo.10950383
The CEA Team. (2024). City Energy Analyst (v3.36.1). Zenodo. https://doi.org/10.5281/zenodo.11382063
2 changes: 1 addition & 1 deletion bin/create_trace_graphviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import yaml
import cea.config
from cea.tests.trace_inputlocator import create_graphviz_output
from cea.utilities.trace_inputlocator.trace_inputlocator import create_graphviz_output

def main(config):
with open(config.trace_inputlocator.yaml_output_file, 'r') as f:
Expand Down
2 changes: 1 addition & 1 deletion cea/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.36.0"
__version__ = "3.36.1"


class ConfigError(Exception):
Expand Down
13 changes: 8 additions & 5 deletions cea/datamanagement/surroundings_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import pandas as pd
from geopandas import GeoDataFrame as gdf
from geopandas.tools import sjoin as spatial_join
from shapely import MultiPolygon

import cea.config
import cea.inputlocator
Expand All @@ -35,7 +36,11 @@ def calc_surrounding_area(zone_gdf, buffer_m):
:param float buffer_m: Buffer to add to zone building geometries
:return: Surrounding area GeoDataFrame
"""
surrounding_area = gdf(geometry=[zone_gdf.geometry.buffer(buffer_m).unary_union], crs=zone_gdf.crs)
merged_zone = zone_gdf.geometry.unary_union
if isinstance(merged_zone, MultiPolygon):
merged_zone = merged_zone.convex_hull

surrounding_area = gdf(geometry=[merged_zone.buffer(buffer_m)], crs=zone_gdf.crs)
return surrounding_area


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

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

return relevant_surroundings.copy()

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

# erase overlapping area
Expand Down
Loading