Add the building/city_objects hierarchy to the city
This commit is contained in:
parent
fecf40247a
commit
0722c5466e
|
@ -125,14 +125,6 @@ class Building(CityObject):
|
|||
"""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def lod(self):
|
||||
"""
|
||||
City object level of detail 1, 2, 3 or 4
|
||||
:return: int
|
||||
"""
|
||||
return self._lod
|
||||
|
||||
@property
|
||||
def surfaces(self) -> List[Surface]:
|
||||
"""
|
||||
|
|
|
@ -1,8 +1,24 @@
|
|||
"""
|
||||
CityObject module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||
"""
|
||||
from helpers.geometry_helper import GeometryHelper
|
||||
|
||||
|
||||
class CityObject:
|
||||
"""
|
||||
class CityObject
|
||||
"""
|
||||
def __init__(self, lod):
|
||||
self._lod = lod
|
||||
self._polyhedron = None
|
||||
self._geometry = GeometryHelper()
|
||||
|
||||
@property
|
||||
def lod(self):
|
||||
"""
|
||||
City object level of detail 1, 2, 3 or 4
|
||||
:return: int
|
||||
"""
|
||||
return self._lod
|
||||
|
|
BIN
docs/build/doctrees/environment.pickle
vendored
BIN
docs/build/doctrees/environment.pickle
vendored
Binary file not shown.
BIN
docs/build/doctrees/index.doctree
vendored
BIN
docs/build/doctrees/index.doctree
vendored
Binary file not shown.
|
@ -105,9 +105,12 @@
|
|||
<span class="sd">"""</span>
|
||||
<span class="kn">import</span> <span class="nn">sys</span>
|
||||
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span><span class="p">,</span> <span class="n">Union</span>
|
||||
|
||||
<span class="kn">import</span> <span class="nn">pyproj</span>
|
||||
<span class="kn">from</span> <span class="nn">pyproj</span> <span class="kn">import</span> <span class="n">Transformer</span>
|
||||
<span class="kn">import</span> <span class="nn">reverse_geocoder</span> <span class="k">as</span> <span class="nn">rg</span>
|
||||
<span class="kn">from</span> <span class="nn">pyproj</span> <span class="kn">import</span> <span class="n">Transformer</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.building</span> <span class="kn">import</span> <span class="n">Building</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.city_object</span> <span class="kn">import</span> <span class="n">CityObject</span>
|
||||
|
||||
|
||||
|
@ -116,12 +119,12 @@
|
|||
<span class="sd"> City class</span>
|
||||
<span class="sd"> """</span>
|
||||
|
||||
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">lower_corner</span><span class="p">,</span> <span class="n">upper_corner</span><span class="p">,</span> <span class="n">srs_name</span><span class="p">,</span> <span class="n">city_objects</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_city_objects</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">lower_corner</span><span class="p">,</span> <span class="n">upper_corner</span><span class="p">,</span> <span class="n">srs_name</span><span class="p">,</span> <span class="n">buildings</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_buildings</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_name</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_lower_corner</span> <span class="o">=</span> <span class="n">lower_corner</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_upper_corner</span> <span class="o">=</span> <span class="n">upper_corner</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_city_objects</span> <span class="o">=</span> <span class="n">city_objects</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_buildings</span> <span class="o">=</span> <span class="n">buildings</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_srs_name</span> <span class="o">=</span> <span class="n">srs_name</span>
|
||||
<span class="c1"># todo: right now extracted at city level, in the future should be extracted also at building level if exist</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_location</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
|
@ -160,10 +163,42 @@
|
|||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">city_objects</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Union</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="n">CityObject</span><span class="p">],</span> <span class="kc">None</span><span class="p">]:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> CityObjects belonging to the city</span>
|
||||
<span class="sd"> :return: None or a list of CityObjects</span>
|
||||
<span class="sd"> City objects belonging to the city</span>
|
||||
<span class="sd"> :return: None or [CityObject]</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_city_objects</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">buildings</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">buildings</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Union</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="n">Building</span><span class="p">],</span> <span class="kc">None</span><span class="p">]:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Buildings belonging to the city</span>
|
||||
<span class="sd"> :return: None or [Building]</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_buildings</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">trees</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="ne">NotImplementedError</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Trees belonging to the city</span>
|
||||
<span class="sd"> :return: NotImplementedError</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">bixi_features</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="ne">NotImplementedError</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Bixi features belonging to the city</span>
|
||||
<span class="sd"> :return: NotImplementedError</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">composting_plants</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="ne">NotImplementedError</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Composting plants belonging to the city</span>
|
||||
<span class="sd"> :return: NotImplementedError</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">lower_corner</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
|
@ -187,7 +222,7 @@
|
|||
<span class="sd"> :param name:str</span>
|
||||
<span class="sd"> :return: None or CityObject</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">for</span> <span class="n">city_object</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">city_objects</span><span class="p">:</span>
|
||||
<span class="k">for</span> <span class="n">city_object</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">buildings</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">city_object</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="n">name</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="n">city_object</span>
|
||||
<span class="k">return</span> <span class="kc">None</span></div>
|
||||
|
@ -198,13 +233,15 @@
|
|||
<span class="sd"> :param new_city_object:CityObject</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_city_objects</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_city_objects</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="k">for</span> <span class="n">city_object</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">city_objects</span><span class="p">:</span>
|
||||
<span class="k">for</span> <span class="n">surface</span> <span class="ow">in</span> <span class="n">city_object</span><span class="o">.</span><span class="n">surfaces</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">new_city_object</span><span class="o">.</span><span class="n">type</span> <span class="o">!=</span> <span class="s1">'building'</span><span class="p">:</span>
|
||||
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="n">new_city_object</span><span class="o">.</span><span class="n">type</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_buildings</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_buildings</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="k">for</span> <span class="n">building</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">buildings</span><span class="p">:</span>
|
||||
<span class="k">for</span> <span class="n">surface</span> <span class="ow">in</span> <span class="n">building</span><span class="o">.</span><span class="n">surfaces</span><span class="p">:</span>
|
||||
<span class="k">for</span> <span class="n">surface2</span> <span class="ow">in</span> <span class="n">new_city_object</span><span class="o">.</span><span class="n">surfaces</span><span class="p">:</span>
|
||||
<span class="n">surface</span><span class="o">.</span><span class="n">shared</span><span class="p">(</span><span class="n">surface2</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_city_objects</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">new_city_object</span><span class="p">)</span></div>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_buildings</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">new_city_object</span><span class="p">)</span></div>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">srs_name</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
|
|
|
@ -1,436 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>city_model_structure.city_object</title>
|
||||
|
||||
<link rel="stylesheet" href="../../_static/pygments.css">
|
||||
<link rel="stylesheet" href="../../_static/theme.css">
|
||||
<link rel="stylesheet" href="../../_static/sphinx_press_theme.css">
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||||
|
||||
<!-- sphinx script_files -->
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/language_data.js"></script>
|
||||
|
||||
|
||||
<script src="../../_static/theme-vendors.js"></script>
|
||||
<script src="../../_static/theme.js" defer></script>
|
||||
|
||||
<link rel="index" title="Index" href="../../genindex.html" />
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" class="theme-container" :class="pageClasses"><navbar @toggle-sidebar="toggleSidebar">
|
||||
<router-link to="../../index.html" class="home-link">
|
||||
|
||||
<span class="site-name">CERC libs</span>
|
||||
|
||||
</router-link>
|
||||
|
||||
<div class="links">
|
||||
<navlinks class="can-hide">
|
||||
|
||||
|
||||
|
||||
</navlinks>
|
||||
</div>
|
||||
</navbar>
|
||||
|
||||
|
||||
<div class="sidebar-mask" @click="toggleSidebar(false)">
|
||||
</div>
|
||||
<sidebar @toggle-sidebar="toggleSidebar">
|
||||
|
||||
<navlinks>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</navlinks><div id="searchbox" class="searchbox" role="search">
|
||||
<div class="caption"><span class="caption-text">Quick search</span>
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../../search.html" method="get">
|
||||
<input type="text" name="q" />
|
||||
<input type="submit" value="Search" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div><div class="sidebar-links" role="navigation" aria-label="main navigation">
|
||||
|
||||
<div class="sidebar-group">
|
||||
<p class="caption">
|
||||
<span class="caption-text"><a href="../../index.html#welcome-to-cerc-libs-s-documentation">Contents:</a></span>
|
||||
</p>
|
||||
<ul class="">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</sidebar>
|
||||
|
||||
<page>
|
||||
<div class="body-header" role="navigation" aria-label="navigation">
|
||||
|
||||
<ul class="breadcrumbs">
|
||||
<li><a href="../../index.html">Docs</a> »</li>
|
||||
|
||||
<li><a href="../index.html">Module code</a> »</li>
|
||||
|
||||
<li>city_model_structure.city_object</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="page-nav">
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
<div class="content" role="main">
|
||||
|
||||
<h1>Source code for city_model_structure.city_object</h1><div class="highlight"><pre>
|
||||
<span></span><span class="sd">"""</span>
|
||||
<span class="sd">CityObject module</span>
|
||||
<span class="sd">SPDX - License - Identifier: LGPL - 3.0 - or -later</span>
|
||||
<span class="sd">Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Union</span><span class="p">,</span> <span class="n">List</span>
|
||||
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>
|
||||
<span class="kn">from</span> <span class="nn">matplotlib</span> <span class="kn">import</span> <span class="n">pylab</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.polyhedron</span> <span class="kn">import</span> <span class="n">Polyhedron</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.thermal_zone</span> <span class="kn">import</span> <span class="n">ThermalZone</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.thermal_boundary</span> <span class="kn">import</span> <span class="n">ThermalBoundary</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.surface</span> <span class="kn">import</span> <span class="n">Surface</span>
|
||||
<span class="kn">from</span> <span class="nn">shapely</span> <span class="kn">import</span> <span class="n">ops</span>
|
||||
<span class="kn">from</span> <span class="nn">shapely.geometry</span> <span class="kn">import</span> <span class="n">MultiPolygon</span>
|
||||
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
|
||||
|
||||
<span class="kn">import</span> <span class="nn">matplotlib.patches</span> <span class="k">as</span> <span class="nn">patches</span>
|
||||
<span class="kn">from</span> <span class="nn">helpers.geometry_helper</span> <span class="kn">import</span> <span class="n">GeometryHelper</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.usage_zone</span> <span class="kn">import</span> <span class="n">UsageZone</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="CityObject"><a class="viewcode-back" href="../../index.html#city_model_structure.city_object.CityObject">[docs]</a><span class="k">class</span> <span class="nc">CityObject</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> CityObject class</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">lod</span><span class="p">,</span> <span class="n">surfaces</span><span class="p">,</span> <span class="n">terrains</span><span class="p">,</span> <span class="n">year_of_construction</span><span class="p">,</span> <span class="n">function</span><span class="p">,</span> <span class="n">lower_corner</span><span class="p">,</span> <span class="n">attic_heated</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
|
||||
<span class="n">basement_heated</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_name</span> <span class="o">=</span> <span class="n">name</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_lod</span> <span class="o">=</span> <span class="n">lod</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_surfaces</span> <span class="o">=</span> <span class="n">surfaces</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_basement_heated</span> <span class="o">=</span> <span class="n">basement_heated</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_attic_heated</span> <span class="o">=</span> <span class="n">attic_heated</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_terrains</span> <span class="o">=</span> <span class="n">terrains</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_year_of_construction</span> <span class="o">=</span> <span class="n">year_of_construction</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_function</span> <span class="o">=</span> <span class="n">function</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_lower_corner</span> <span class="o">=</span> <span class="n">lower_corner</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_geometry</span> <span class="o">=</span> <span class="n">GeometryHelper</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_average_storey_height</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_storeys_above_ground</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_foot_print</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_usage_zones</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="c1"># ToDo: this need to be changed when we have other city_objects beside "buildings"</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_type</span> <span class="o">=</span> <span class="s1">'building'</span>
|
||||
|
||||
<span class="c1"># ToDo: Check this for LOD4</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_thermal_zones</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">lod</span> <span class="o"><</span> <span class="mi">8</span><span class="p">:</span>
|
||||
<span class="c1"># for lod under 4 is just one thermal zone</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_thermal_zones</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">ThermalZone</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">surfaces</span><span class="p">))</span>
|
||||
|
||||
<span class="k">for</span> <span class="n">t_zones</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_thermal_zones</span><span class="p">:</span>
|
||||
<span class="n">t_zones</span><span class="o">.</span><span class="n">bounded</span> <span class="o">=</span> <span class="p">[</span><span class="n">ThermalBoundary</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="p">[</span><span class="n">t_zones</span><span class="p">])</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="n">t_zones</span><span class="o">.</span><span class="n">surfaces</span><span class="p">]</span>
|
||||
<span class="n">surface_id</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="k">for</span> <span class="n">surface</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_surfaces</span><span class="p">:</span>
|
||||
<span class="n">surface</span><span class="o">.</span><span class="n">lower_corner</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_lower_corner</span>
|
||||
<span class="n">surface</span><span class="o">.</span><span class="n">parent</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">surface_id</span><span class="p">)</span>
|
||||
<span class="n">surface_id</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">usage_zones</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">UsageZone</span><span class="p">]:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Get city object usage zones</span>
|
||||
<span class="sd"> :return: [UsageZone]</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_usage_zones</span>
|
||||
|
||||
<span class="nd">@usage_zones</span><span class="o">.</span><span class="n">setter</span>
|
||||
<span class="k">def</span> <span class="nf">usage_zones</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">values</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Set city objects usage zones</span>
|
||||
<span class="sd"> :param values: [UsageZones]</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="c1"># ToDo: this is only valid for one usage zone need to be revised for multiple usage zones.</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_usage_zones</span> <span class="o">=</span> <span class="n">values</span>
|
||||
<span class="k">for</span> <span class="n">thermal_zone</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">thermal_zones</span><span class="p">:</span>
|
||||
<span class="n">thermal_zone</span><span class="o">.</span><span class="n">usage_zones</span> <span class="o">=</span> <span class="p">[(</span><span class="mi">100</span><span class="p">,</span> <span class="n">usage_zone</span><span class="p">)</span> <span class="k">for</span> <span class="n">usage_zone</span> <span class="ow">in</span> <span class="n">values</span><span class="p">]</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">terrains</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">Surface</span><span class="p">]:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Get city object terrain surfaces</span>
|
||||
<span class="sd"> :return: [Surface]</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_terrains</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">attic_heated</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Get if the city object attic is heated</span>
|
||||
<span class="sd"> :return: Boolean</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_attic_heated</span>
|
||||
|
||||
<span class="nd">@attic_heated</span><span class="o">.</span><span class="n">setter</span>
|
||||
<span class="k">def</span> <span class="nf">attic_heated</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Set if the city object attic is heated</span>
|
||||
<span class="sd"> :param value: Boolean</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_attic_heated</span> <span class="o">=</span> <span class="n">value</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">basement_heated</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Get if the city object basement is heated</span>
|
||||
<span class="sd"> :return: Boolean</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_basement_heated</span>
|
||||
|
||||
<span class="nd">@basement_heated</span><span class="o">.</span><span class="n">setter</span>
|
||||
<span class="k">def</span> <span class="nf">basement_heated</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Set if the city object basement is heated</span>
|
||||
<span class="sd"> :param value: Boolean</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_attic_heated</span> <span class="o">=</span> <span class="n">value</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">name</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object name</span>
|
||||
<span class="sd"> :return: str</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_name</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">lod</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object level of detail 1, 2, 3 or 4</span>
|
||||
<span class="sd"> :return: int</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_lod</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">surfaces</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">Surface</span><span class="p">]:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object surfaces</span>
|
||||
<span class="sd"> :return: [Surface]</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_surfaces</span>
|
||||
|
||||
<div class="viewcode-block" id="CityObject.surface"><a class="viewcode-back" href="../../index.html#city_model_structure.city_object.CityObject.surface">[docs]</a> <span class="k">def</span> <span class="nf">surface</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">)</span> <span class="o">-></span> <span class="n">Union</span><span class="p">[</span><span class="n">Surface</span><span class="p">,</span> <span class="kc">None</span><span class="p">]:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Get the city object surface with a given name</span>
|
||||
<span class="sd"> :param name: str</span>
|
||||
<span class="sd"> :return: None or Surface</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">surfaces</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">s</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="n">name</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="n">s</span>
|
||||
<span class="k">return</span> <span class="kc">None</span></div>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">thermal_zones</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">ThermalZone</span><span class="p">]:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object thermal zones</span>
|
||||
<span class="sd"> :return: [ThermalZone]</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_thermal_zones</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">volume</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object volume in cubic meters</span>
|
||||
<span class="sd"> :return: float</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span> <span class="o">=</span> <span class="n">Polyhedron</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">surfaces</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span><span class="o">.</span><span class="n">volume</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">heated_volume</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object heated volume in cubic meters</span>
|
||||
<span class="sd"> :return: float</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span> <span class="o">=</span> <span class="n">Polyhedron</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">surfaces</span><span class="p">)</span>
|
||||
<span class="c1"># ToDo: this need to be the calculated based on the basement and attic heated values</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span><span class="o">.</span><span class="n">volume</span>
|
||||
|
||||
<div class="viewcode-block" id="CityObject.stl_export"><a class="viewcode-back" href="../../index.html#city_model_structure.city_object.CityObject.stl_export">[docs]</a> <span class="k">def</span> <span class="nf">stl_export</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Export the city object to stl file (city_object_name.stl) to the given path</span>
|
||||
<span class="sd"> :param path: str</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span> <span class="o">=</span> <span class="n">Polyhedron</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">surfaces</span><span class="p">)</span>
|
||||
<span class="n">full_path</span> <span class="o">=</span> <span class="p">(</span><span class="n">Path</span><span class="p">(</span><span class="n">path</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_name</span> <span class="o">+</span> <span class="s1">'.stl'</span><span class="p">))</span><span class="o">.</span><span class="n">resolve</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="n">full_path</span><span class="p">)</span></div>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">year_of_construction</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object year of construction</span>
|
||||
<span class="sd"> :return: int</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_year_of_construction</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">function</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object function</span>
|
||||
<span class="sd"> :return: str</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_function</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">average_storey_height</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Get city object average storey height in meters</span>
|
||||
<span class="sd"> :return: float</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_average_storey_height</span>
|
||||
|
||||
<span class="nd">@average_storey_height</span><span class="o">.</span><span class="n">setter</span>
|
||||
<span class="k">def</span> <span class="nf">average_storey_height</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Set city object average storey height in meters</span>
|
||||
<span class="sd"> :param value: float</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_average_storey_height</span> <span class="o">=</span> <span class="n">value</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">storeys_above_ground</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Get city object storeys number above ground</span>
|
||||
<span class="sd"> :return: int</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_storeys_above_ground</span>
|
||||
|
||||
<span class="nd">@storeys_above_ground</span><span class="o">.</span><span class="n">setter</span>
|
||||
<span class="k">def</span> <span class="nf">storeys_above_ground</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Set city object storeys number above ground</span>
|
||||
<span class="sd"> :param value: int</span>
|
||||
<span class="sd"> :return:</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_storeys_above_ground</span> <span class="o">=</span> <span class="n">value</span>
|
||||
|
||||
<span class="nd">@staticmethod</span>
|
||||
<span class="k">def</span> <span class="nf">_tuple_to_point</span><span class="p">(</span><span class="n">xy_tuple</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="p">[</span><span class="n">xy_tuple</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">xy_tuple</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="mf">0.0</span><span class="p">]</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">_plot</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">polygon</span><span class="p">):</span>
|
||||
<span class="n">points</span> <span class="o">=</span> <span class="p">()</span>
|
||||
<span class="k">for</span> <span class="n">point_tuple</span> <span class="ow">in</span> <span class="n">polygon</span><span class="o">.</span><span class="n">exterior</span><span class="o">.</span><span class="n">coords</span><span class="p">:</span>
|
||||
<span class="n">almost_equal</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">points</span><span class="p">:</span>
|
||||
<span class="n">point_1</span> <span class="o">=</span> <span class="n">CityObject</span><span class="o">.</span><span class="n">_tuple_to_point</span><span class="p">(</span><span class="n">point</span><span class="p">)</span>
|
||||
<span class="n">point_2</span> <span class="o">=</span> <span class="n">CityObject</span><span class="o">.</span><span class="n">_tuple_to_point</span><span class="p">(</span><span class="n">point_tuple</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_geometry</span><span class="o">.</span><span class="n">almost_equal</span><span class="p">(</span><span class="n">point_1</span><span class="p">,</span> <span class="n">point_2</span><span class="p">):</span>
|
||||
<span class="n">almost_equal</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="k">break</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">almost_equal</span><span class="p">:</span>
|
||||
<span class="n">points</span> <span class="o">=</span> <span class="n">points</span> <span class="o">+</span> <span class="p">(</span><span class="n">point_tuple</span><span class="p">,)</span>
|
||||
<span class="n">points</span> <span class="o">=</span> <span class="n">points</span> <span class="o">+</span> <span class="p">(</span><span class="n">points</span><span class="p">[</span><span class="mi">0</span><span class="p">],)</span>
|
||||
<span class="n">pylab</span><span class="o">.</span><span class="n">scatter</span><span class="p">([</span><span class="n">point</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">points</span><span class="p">],</span> <span class="p">[</span><span class="n">point</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="k">for</span> <span class="n">point</span> <span class="ow">in</span> <span class="n">points</span><span class="p">])</span>
|
||||
<span class="n">pylab</span><span class="o">.</span><span class="n">gca</span><span class="p">()</span><span class="o">.</span><span class="n">add_patch</span><span class="p">(</span><span class="n">patches</span><span class="o">.</span><span class="n">Polygon</span><span class="p">(</span><span class="n">points</span><span class="p">,</span> <span class="n">closed</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">fill</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
|
||||
<span class="n">pylab</span><span class="o">.</span><span class="n">grid</span><span class="p">()</span>
|
||||
<span class="n">pylab</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">foot_print</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Surface</span><span class="p">:</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object foot print surface</span>
|
||||
<span class="sd"> :return: Surface</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_foot_print</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="n">shapelys</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="n">union</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="k">for</span> <span class="n">surface</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">surfaces</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">surface</span><span class="o">.</span><span class="n">shapely</span><span class="o">.</span><span class="n">is_empty</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">surface</span><span class="o">.</span><span class="n">shapely</span><span class="o">.</span><span class="n">is_valid</span><span class="p">:</span>
|
||||
<span class="k">continue</span>
|
||||
<span class="n">shapelys</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">surface</span><span class="o">.</span><span class="n">shapely</span><span class="p">)</span>
|
||||
<span class="n">union</span> <span class="o">=</span> <span class="n">ops</span><span class="o">.</span><span class="n">unary_union</span><span class="p">(</span><span class="n">shapelys</span><span class="p">)</span>
|
||||
<span class="n">shapelys</span> <span class="o">=</span> <span class="p">[</span><span class="n">union</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">union</span><span class="p">,</span> <span class="n">MultiPolygon</span><span class="p">):</span>
|
||||
<span class="ne">Exception</span><span class="p">(</span><span class="s1">'foot print returns a multipolygon'</span><span class="p">)</span>
|
||||
<span class="n">points_list</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="k">for</span> <span class="n">point_tuple</span> <span class="ow">in</span> <span class="n">union</span><span class="o">.</span><span class="n">exterior</span><span class="o">.</span><span class="n">coords</span><span class="p">:</span>
|
||||
<span class="c1"># ToDo: should be Z 0.0 or min Z?</span>
|
||||
<span class="n">point</span> <span class="o">=</span> <span class="n">CityObject</span><span class="o">.</span><span class="n">_tuple_to_point</span><span class="p">(</span><span class="n">point_tuple</span><span class="p">)</span>
|
||||
<span class="n">almost_equal</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="k">for</span> <span class="n">existing_point</span> <span class="ow">in</span> <span class="n">points_list</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_geometry</span><span class="o">.</span><span class="n">almost_equal</span><span class="p">(</span><span class="n">point</span><span class="p">,</span> <span class="n">existing_point</span><span class="p">):</span>
|
||||
<span class="n">almost_equal</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="k">break</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">almost_equal</span><span class="p">:</span>
|
||||
<span class="n">points_list</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">point</span><span class="p">)</span>
|
||||
<span class="n">points_list</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">points_list</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">points_list</span><span class="p">)</span> <span class="o">*</span> <span class="mi">3</span><span class="p">)</span>
|
||||
<span class="n">points</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array_str</span><span class="p">(</span><span class="n">points_list</span><span class="p">)</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">'['</span><span class="p">,</span> <span class="s1">''</span><span class="p">)</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">']'</span><span class="p">,</span> <span class="s1">''</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_foot_print</span> <span class="o">=</span> <span class="n">Surface</span><span class="p">(</span><span class="n">points</span><span class="p">,</span> <span class="n">remove_last</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">is_projected</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_foot_print</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">type</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object type</span>
|
||||
<span class="sd"> :return: str</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_type</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">max_height</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> City object maximal height in meters</span>
|
||||
<span class="sd"> :return: float</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span> <span class="o">=</span> <span class="n">Polyhedron</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">surfaces</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron</span><span class="o">.</span><span class="n">max_z</span></div>
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
<div class="page-nav">
|
||||
<div class="inner"><ul class="page-nav">
|
||||
</ul><div class="footer" role="contentinfo">
|
||||
© Copyright 2020, Guillermo Gutierrez.
|
||||
<br>
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.1.1 with <a href="https://github.com/schettino72/sphinx_press_theme">Press Theme</a>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</page>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -104,7 +104,8 @@
|
|||
<span class="sd">Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
|
||||
<span class="kn">import</span> <span class="nn">stl</span>
|
||||
<span class="kn">from</span> <span class="nn">trimesh</span> <span class="kn">import</span> <span class="n">Trimesh</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">helpers.geometry_helper</span> <span class="kn">import</span> <span class="n">GeometryHelper</span>
|
||||
|
||||
|
||||
|
@ -124,7 +125,7 @@
|
|||
|
||||
<span class="k">def</span> <span class="nf">_position_of</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">point</span><span class="p">):</span>
|
||||
<span class="n">vertices</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vertices</span>
|
||||
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">vertices</span><span class="p">):</span>
|
||||
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">vertices</span><span class="p">)):</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_geometry</span><span class="o">.</span><span class="n">almost_equal</span><span class="p">(</span><span class="n">vertices</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">point</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="n">i</span>
|
||||
<span class="k">return</span> <span class="o">-</span><span class="mi">1</span>
|
||||
|
@ -170,10 +171,10 @@
|
|||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">_polyhedron_mesh</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_mesh</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_mesh</span> <span class="o">=</span> <span class="n">stl</span><span class="o">.</span><span class="n">mesh</span><span class="o">.</span><span class="n">Mesh</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">faces</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="n">stl</span><span class="o">.</span><span class="n">mesh</span><span class="o">.</span><span class="n">Mesh</span><span class="o">.</span><span class="n">dtype</span><span class="p">))</span>
|
||||
<span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">faces</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">faces</span><span class="p">):</span>
|
||||
<span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_mesh</span><span class="o">.</span><span class="n">vectors</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">j</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">vertices</span><span class="p">[</span><span class="n">faces</span><span class="p">[</span><span class="n">j</span><span class="p">],</span> <span class="p">:]</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_mesh</span> <span class="o">=</span> <span class="n">Trimesh</span><span class="p">(</span><span class="n">vertices</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">asarray</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">vertices</span><span class="p">),</span> <span class="n">faces</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">asarray</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">faces</span><span class="p">))</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_mesh</span><span class="o">.</span><span class="n">is_volume</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s1">'The geometry is not a closed volume'</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="kc">None</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_mesh</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
|
@ -183,7 +184,7 @@
|
|||
<span class="sd"> :return: float</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_volume</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_volume</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron_mesh</span><span class="o">.</span><span class="n">get_mass_properties</span><span class="p">()</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_volume</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron_mesh</span><span class="o">.</span><span class="n">volume</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_volume</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
|
@ -192,15 +193,17 @@
|
|||
<span class="sd"> Polyhedron maximal z value</span>
|
||||
<span class="sd"> :return: float</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron_mesh</span><span class="o">.</span><span class="n">z</span><span class="o">.</span><span class="n">max</span><span class="p">()</span>
|
||||
<span class="n">bounds</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron_mesh</span><span class="o">.</span><span class="n">bounds</span>
|
||||
<span class="n">z_max</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">bounds</span><span class="p">[:,</span> <span class="mi">2</span><span class="p">])</span>
|
||||
<span class="k">return</span> <span class="n">z_max</span>
|
||||
|
||||
<div class="viewcode-block" id="Polyhedron.save"><a class="viewcode-back" href="../../index.html#city_model_structure.polyhedron.Polyhedron.save">[docs]</a> <span class="k">def</span> <span class="nf">save</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">full_path</span><span class="p">):</span>
|
||||
<div class="viewcode-block" id="Polyhedron.export"><a class="viewcode-back" href="../../index.html#city_model_structure.polyhedron.Polyhedron.export">[docs]</a> <span class="k">def</span> <span class="nf">export</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">full_path</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Export the polyhedron to stl given file</span>
|
||||
<span class="sd"> :param full_path: str</span>
|
||||
<span class="sd"> :return: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron_mesh</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="n">full_path</span><span class="p">)</span></div></div>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_polyhedron_mesh</span><span class="o">.</span><span class="n">export</span><span class="p">(</span><span class="n">full_path</span><span class="p">)</span></div></div>
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -104,9 +104,12 @@
|
|||
<span class="sd">Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">annotations</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Union</span>
|
||||
|
||||
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
|
||||
<span class="kn">import</span> <span class="nn">pyny3d.geoms</span> <span class="k">as</span> <span class="nn">pn</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">helpers.geometry_helper</span> <span class="kn">import</span> <span class="n">GeometryHelper</span>
|
||||
|
||||
|
||||
|
@ -309,7 +312,7 @@
|
|||
<span class="n">equal</span> <span class="o">=</span> <span class="mi">0</span>
|
||||
<span class="k">for</span> <span class="n">terrain_point</span> <span class="ow">in</span> <span class="n">terrain_points</span><span class="p">:</span>
|
||||
<span class="k">for</span> <span class="n">ground_point</span> <span class="ow">in</span> <span class="n">ground_points</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_geometry</span><span class="o">.</span><span class="n">almost_equal</span><span class="p">(</span><span class="n">terrain_point</span><span class="p">,</span> <span class="n">ground_point</span><span class="p">):</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_geometry_helper</span><span class="o">.</span><span class="n">almost_equal</span><span class="p">(</span><span class="n">terrain_point</span><span class="p">,</span> <span class="n">ground_point</span><span class="p">):</span>
|
||||
<span class="n">equal</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||
<span class="k">return</span> <span class="n">equal</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">terrain_points</span><span class="p">)</span>
|
||||
|
||||
|
|
|
@ -104,9 +104,10 @@
|
|||
<span class="sd">Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.layer</span> <span class="kn">import</span> <span class="n">Layer</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.thermal_opening</span> <span class="kn">import</span> <span class="n">ThermalOpening</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.thermal_zone</span> <span class="kn">import</span> <span class="n">ThermalZone</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.layer</span> <span class="kn">import</span> <span class="n">Layer</span>
|
||||
<span class="kn">from</span> <span class="nn">helpers.configuration_helper</span> <span class="kn">import</span> <span class="n">ConfigurationHelper</span>
|
||||
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
<span class="sd"> Get thermal opening openable ratio, NOT IMPLEMENTED</span>
|
||||
<span class="sd"> :return: Exception</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s1">'Not implemented'</span><span class="p">)</span>
|
||||
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">()</span>
|
||||
|
||||
<span class="nd">@openable_ratio</span><span class="o">.</span><span class="n">setter</span>
|
||||
<span class="k">def</span> <span class="nf">openable_ratio</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
|
||||
|
@ -135,7 +135,7 @@
|
|||
<span class="sd"> :param value: Any</span>
|
||||
<span class="sd"> :return: Exception</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s1">'Not implemented'</span><span class="p">)</span>
|
||||
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">()</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">conductivity</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
|
|
|
@ -104,8 +104,9 @@
|
|||
<span class="sd">Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span><span class="p">,</span> <span class="n">TypeVar</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.usage_zone</span> <span class="kn">import</span> <span class="n">UsageZone</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.surface</span> <span class="kn">import</span> <span class="n">Surface</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.usage_zone</span> <span class="kn">import</span> <span class="n">UsageZone</span>
|
||||
<span class="kn">from</span> <span class="nn">helpers.configuration_helper</span> <span class="kn">import</span> <span class="n">ConfigurationHelper</span>
|
||||
|
||||
<span class="n">ThermalBoundary</span> <span class="o">=</span> <span class="n">TypeVar</span><span class="p">(</span><span class="s1">'ThermalBoundary'</span><span class="p">)</span>
|
||||
|
@ -176,6 +177,7 @@
|
|||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">surfaces</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">Surface</span><span class="p">]:</span>
|
||||
<span class="c1"># todo: This property should be erased</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Get thermal zone surfaces</span>
|
||||
<span class="sd"> :return: [Surface]</span>
|
||||
|
|
|
@ -104,7 +104,9 @@
|
|||
<span class="sd">Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.internal_gains</span> <span class="kn">import</span> <span class="n">InternalGains</span>
|
||||
<span class="kn">from</span> <span class="nn">helpers.configuration_helper</span> <span class="kn">import</span> <span class="n">ConfigurationHelper</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="UsageZone"><a class="viewcode-back" href="../../index.html#city_model_structure.usage_zone.UsageZone">[docs]</a><span class="k">class</span> <span class="nc">UsageZone</span><span class="p">:</span>
|
||||
|
@ -119,7 +121,8 @@
|
|||
<span class="bp">self</span><span class="o">.</span><span class="n">_cooling_setpoint</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_hours_day</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_days_year</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_mechanical_air_change</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="c1"># todo: this must come from library, talk to Rabeeh</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_mechanical_air_change</span> <span class="o">=</span> <span class="n">ConfigurationHelper</span><span class="p">()</span><span class="o">.</span><span class="n">min_air_change</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">internal_gains</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="n">InternalGains</span><span class="p">]:</span>
|
||||
|
|
|
@ -103,8 +103,8 @@
|
|||
<span class="sd">SPDX - License - Identifier: LGPL - 3.0 - or -later</span>
|
||||
<span class="sd">Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="kn">from</span> <span class="nn">geometry.geometry_feeders.city_gml</span> <span class="kn">import</span> <span class="n">CityGml</span>
|
||||
<span class="kn">from</span> <span class="nn">city_model_structure.city</span> <span class="kn">import</span> <span class="n">City</span>
|
||||
<span class="kn">from</span> <span class="nn">geometry.geometry_feeders.city_gml</span> <span class="kn">import</span> <span class="n">CityGml</span>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="GeometryFactory"><a class="viewcode-back" href="../../index.html#geometry.geometry_factory.GeometryFactory">[docs]</a><span class="k">class</span> <span class="nc">GeometryFactory</span><span class="p">:</span>
|
||||
|
|
4
docs/build/html/_modules/index.html
vendored
4
docs/build/html/_modules/index.html
vendored
|
@ -96,8 +96,8 @@
|
|||
<div class="content" role="main">
|
||||
|
||||
<h1>All modules for which code is available</h1>
|
||||
<ul><li><a href="city_model_structure/city.html">city_model_structure.city</a></li>
|
||||
<li><a href="city_model_structure/city_object.html">city_model_structure.city_object</a></li>
|
||||
<ul><li><a href="city_model_structure/building.html">city_model_structure.building</a></li>
|
||||
<li><a href="city_model_structure/city.html">city_model_structure.city</a></li>
|
||||
<li><a href="city_model_structure/internal_gains.html">city_model_structure.internal_gains</a></li>
|
||||
<li><a href="city_model_structure/layer.html">city_model_structure.layer</a></li>
|
||||
<li><a href="city_model_structure/material.html">city_model_structure.material</a></li>
|
||||
|
|
6
docs/build/html/_sources/index.rst.txt
vendored
6
docs/build/html/_sources/index.rst.txt
vendored
|
@ -30,6 +30,12 @@ City Object
|
|||
.. automodule:: city_model_structure.city_object
|
||||
:members:
|
||||
|
||||
Building
|
||||
********************
|
||||
.. automodule:: city_model_structure.building
|
||||
:members:
|
||||
|
||||
|
||||
Internal Gains
|
||||
********************
|
||||
.. automodule:: city_model_structure.internal_gains
|
||||
|
|
71
docs/build/html/genindex.html
vendored
71
docs/build/html/genindex.html
vendored
|
@ -152,11 +152,11 @@
|
|||
<li><a href="index.html#city_model_structure.thermal_boundary.ThermalBoundary.area_below_ground">(city_model_structure.thermal_boundary.ThermalBoundary property)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.attic_heated">attic_heated() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.attic_heated">attic_heated() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.internal_gains.InternalGains.average_internal_gain">average_internal_gain() (city_model_structure.internal_gains.InternalGains property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.average_storey_height">average_storey_height() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.average_storey_height">average_storey_height() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.surface.Surface.azimuth">azimuth() (city_model_structure.surface.Surface property)</a>
|
||||
|
||||
|
@ -171,12 +171,18 @@
|
|||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.thermal_opening.ThermalOpening.back_side_solar_transmittance_at_normal_incidence">back_side_solar_transmittance_at_normal_incidence() (city_model_structure.thermal_opening.ThermalOpening property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.building.Building.basement_heated">basement_heated() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city.City.bixi_features">bixi_features() (city_model_structure.city.City property)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.basement_heated">basement_heated() (city_model_structure.city_object.CityObject property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.thermal_zone.ThermalZone.bounded">bounded() (city_model_structure.thermal_zone.ThermalZone property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.building.Building">Building (class in city_model_structure.building)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city.City.buildings">buildings() (city_model_structure.city.City property)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
@ -189,6 +195,13 @@
|
|||
<li><a href="index.html#geometry.geometry_factory.GeometryFactory.city">city() (geometry.geometry_factory.GeometryFactory property)</a>
|
||||
</li>
|
||||
<li>
|
||||
city_model_structure.building
|
||||
|
||||
<ul>
|
||||
<li><a href="index.html#module-city_model_structure.building">module</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li>
|
||||
city_model_structure.city
|
||||
|
||||
<ul>
|
||||
|
@ -271,7 +284,7 @@
|
|||
</li>
|
||||
<li><a href="index.html#city_model_structure.city.City.city_objects">city_objects() (city_model_structure.city.City property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject">CityObject (class in city_model_structure.city_object)</a>
|
||||
<li><a href="index.html#city_model_structure.city.City.composting_plants">composting_plants() (city_model_structure.city.City property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.material.Material.conductivity">conductivity() (city_model_structure.material.Material property)</a>
|
||||
|
||||
|
@ -308,6 +321,10 @@
|
|||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.thermal_zone.ThermalZone.effective_thermal_capacity">effective_thermal_capacity() (city_model_structure.thermal_zone.ThermalZone property)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.polyhedron.Polyhedron.export">export() (city_model_structure.polyhedron.Polyhedron method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
@ -327,13 +344,13 @@
|
|||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.foot_print">foot_print() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.foot_print">foot_print() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.thermal_opening.ThermalOpening.frame_ratio">frame_ratio() (city_model_structure.thermal_opening.ThermalOpening property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.thermal_opening.ThermalOpening.front_side_solar_transmittance_at_normal_incidence">front_side_solar_transmittance_at_normal_incidence() (city_model_structure.thermal_opening.ThermalOpening property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.function">function() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.function">function() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
@ -370,7 +387,7 @@
|
|||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.thermal_zone.ThermalZone.heated">heated() (city_model_structure.thermal_zone.ThermalZone property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.heated_volume">heated_volume() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.heated_volume">heated_volume() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
|
@ -420,7 +437,7 @@
|
|||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.thermal_boundary.ThermalBoundary.layers">layers() (city_model_structure.thermal_boundary.ThermalBoundary property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.lod">lod() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.lod">lod() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city.City.lower_corner">lower_corner() (city_model_structure.city.City property)</a>
|
||||
</li>
|
||||
|
@ -434,7 +451,7 @@
|
|||
</li>
|
||||
<li><a href="index.html#city_model_structure.layer.Layer.material">material() (city_model_structure.layer.Layer property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.max_height">max_height() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.max_height">max_height() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.polyhedron.Polyhedron.max_z">max_z() (city_model_structure.polyhedron.Polyhedron property)</a>
|
||||
</li>
|
||||
|
@ -450,6 +467,8 @@
|
|||
module
|
||||
|
||||
<ul>
|
||||
<li><a href="index.html#module-city_model_structure.building">city_model_structure.building</a>
|
||||
</li>
|
||||
<li><a href="index.html#module-city_model_structure.city">city_model_structure.city</a>
|
||||
</li>
|
||||
<li><a href="index.html#module-city_model_structure.city_object">city_model_structure.city_object</a>
|
||||
|
@ -485,10 +504,10 @@
|
|||
<h2 id="N">N</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.city.City.name">name() (city_model_structure.city.City property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.name">name() (city_model_structure.building.Building property)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.name">(city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.city.City.name">(city_model_structure.city.City property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.surface.Surface.name">(city_model_structure.surface.Surface property)</a>
|
||||
</li>
|
||||
|
@ -560,8 +579,6 @@
|
|||
<h2 id="S">S</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.polyhedron.Polyhedron.save">save() (city_model_structure.polyhedron.Polyhedron method)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.surface.Surface.shapely">shapely() (city_model_structure.surface.Surface property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.surface.Surface.shared">shared() (city_model_structure.surface.Surface method)</a>
|
||||
|
@ -576,15 +593,15 @@
|
|||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.stl_export">stl_export() (city_model_structure.city_object.CityObject method)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.stl_export">stl_export() (city_model_structure.building.Building method)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.storeys_above_ground">storeys_above_ground() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.storeys_above_ground">storeys_above_ground() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.surface.Surface">Surface (class in city_model_structure.surface)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.surface">surface() (city_model_structure.city_object.CityObject method)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.surface">surface() (city_model_structure.building.Building method)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.surfaces">surfaces() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.surfaces">surfaces() (city_model_structure.building.Building property)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="index.html#city_model_structure.thermal_zone.ThermalZone.surfaces">(city_model_structure.thermal_zone.ThermalZone property)</a>
|
||||
|
@ -598,7 +615,7 @@
|
|||
<h2 id="T">T</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.terrains">terrains() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.terrains">terrains() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.material.Material.thermal_absorptance">thermal_absorptance() (city_model_structure.material.Material property)</a>
|
||||
</li>
|
||||
|
@ -606,14 +623,14 @@
|
|||
</li>
|
||||
<li><a href="index.html#city_model_structure.material.Material.thermal_resistance">thermal_resistance() (city_model_structure.material.Material property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.thermal_zones">thermal_zones() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.thermal_zones">thermal_zones() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.thermal_boundary.ThermalBoundary">ThermalBoundary (class in city_model_structure.thermal_boundary)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.thermal_opening.ThermalOpening">ThermalOpening (class in city_model_structure.thermal_opening)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.thermal_zone.ThermalZone">ThermalZone (class in city_model_structure.thermal_zone)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.layer.Layer.thickness">thickness() (city_model_structure.layer.Layer property)</a>
|
||||
|
@ -622,7 +639,9 @@
|
|||
<li><a href="index.html#city_model_structure.thermal_opening.ThermalOpening.thickness">(city_model_structure.thermal_opening.ThermalOpening property)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.type">type() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.city.City.trees">trees() (city_model_structure.city.City property)</a>
|
||||
</li>
|
||||
<li><a href="index.html#city_model_structure.building.Building.type">type() (city_model_structure.building.Building property)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="index.html#city_model_structure.surface.Surface.type">(city_model_structure.surface.Surface property)</a>
|
||||
|
@ -651,7 +670,7 @@
|
|||
</ul></li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.usage_zones">usage_zones() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.usage_zones">usage_zones() (city_model_structure.building.Building property)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="index.html#city_model_structure.thermal_zone.ThermalZone.usage_zones">(city_model_structure.thermal_zone.ThermalZone property)</a>
|
||||
|
@ -673,7 +692,7 @@
|
|||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.volume">volume() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.volume">volume() (city_model_structure.building.Building property)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="index.html#city_model_structure.polyhedron.Polyhedron.volume">(city_model_structure.polyhedron.Polyhedron property)</a>
|
||||
|
@ -697,7 +716,7 @@
|
|||
<h2 id="Y">Y</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="index.html#city_model_structure.city_object.CityObject.year_of_construction">year_of_construction() (city_model_structure.city_object.CityObject property)</a>
|
||||
<li><a href="index.html#city_model_structure.building.Building.year_of_construction">year_of_construction() (city_model_structure.building.Building property)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
|
135
docs/build/html/index.html
vendored
135
docs/build/html/index.html
vendored
|
@ -117,7 +117,7 @@ SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|||
Copyright © 2020 Project Author Guille Gutierrez <a class="reference external" href="mailto:guillermo.gutierrezmorote%40concordia.ca">guillermo<span>.</span>gutierrezmorote<span>@</span>concordia<span>.</span>ca</a></p>
|
||||
<dl class="py class">
|
||||
<dt id="city_model_structure.city.City">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">city_model_structure.city.</code><code class="sig-name descname">City</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">lower_corner</span></em>, <em class="sig-param"><span class="n">upper_corner</span></em>, <em class="sig-param"><span class="n">srs_name</span></em>, <em class="sig-param"><span class="n">city_objects</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/city_model_structure/city.html#City"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.city.City" title="Permalink to this definition">¶</a></dt>
|
||||
<em class="property">class </em><code class="sig-prename descclassname">city_model_structure.city.</code><code class="sig-name descname">City</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">lower_corner</span></em>, <em class="sig-param"><span class="n">upper_corner</span></em>, <em class="sig-param"><span class="n">srs_name</span></em>, <em class="sig-param"><span class="n">buildings</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/city_model_structure/city.html#City"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.city.City" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City class</p>
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city.City.add_city_object">
|
||||
|
@ -127,9 +127,23 @@ Copyright © 2020 Project Author Guille Gutierrez <a class="reference external"
|
|||
:return: None</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city.City.bixi_features">
|
||||
<em class="property">property </em><code class="sig-name descname">bixi_features</code><a class="headerlink" href="#city_model_structure.city.City.bixi_features" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bixi features belonging to the city
|
||||
:return: NotImplementedError</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city.City.buildings">
|
||||
<em class="property">property </em><code class="sig-name descname">buildings</code><a class="headerlink" href="#city_model_structure.city.City.buildings" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Buildings belonging to the city
|
||||
:return: None or [Building]</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city.City.city_object">
|
||||
<code class="sig-name descname">city_object</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span> → Optional<span class="p">[</span><a class="reference internal" href="#city_model_structure.city_object.CityObject" title="city_model_structure.city_object.CityObject">city_model_structure.city_object.CityObject</a><span class="p">]</span><a class="reference internal" href="_modules/city_model_structure/city.html#City.city_object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.city.City.city_object" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-name descname">city_object</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span> → Optional<span class="p">[</span>city_model_structure.city_object.CityObject<span class="p">]</span><a class="reference internal" href="_modules/city_model_structure/city.html#City.city_object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.city.City.city_object" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Retrieve the city CityObject with the given name
|
||||
:param name:str
|
||||
:return: None or CityObject</p>
|
||||
|
@ -138,8 +152,15 @@ Copyright © 2020 Project Author Guille Gutierrez <a class="reference external"
|
|||
<dl class="py method">
|
||||
<dt id="city_model_structure.city.City.city_objects">
|
||||
<em class="property">property </em><code class="sig-name descname">city_objects</code><a class="headerlink" href="#city_model_structure.city.City.city_objects" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>CityObjects belonging to the city
|
||||
:return: None or a list of CityObjects</p>
|
||||
<dd><p>City objects belonging to the city
|
||||
:return: None or [CityObject]</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city.City.composting_plants">
|
||||
<em class="property">property </em><code class="sig-name descname">composting_plants</code><a class="headerlink" href="#city_model_structure.city.City.composting_plants" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Composting plants belonging to the city
|
||||
:return: NotImplementedError</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
|
@ -170,6 +191,13 @@ Copyright © 2020 Project Author Guille Gutierrez <a class="reference external"
|
|||
:return: str</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city.City.trees">
|
||||
<em class="property">property </em><code class="sig-name descname">trees</code><a class="headerlink" href="#city_model_structure.city.City.trees" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Trees belonging to the city
|
||||
:return: NotImplementedError</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city.City.upper_corner">
|
||||
<em class="property">property </em><code class="sig-name descname">upper_corner</code><a class="headerlink" href="#city_model_structure.city.City.upper_corner" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -182,144 +210,147 @@ Copyright © 2020 Project Author Guille Gutierrez <a class="reference external"
|
|||
</div>
|
||||
<div class="section" id="module-city_model_structure.city_object">
|
||||
<span id="city-object"></span><h2>City Object<a class="headerlink" href="#module-city_model_structure.city_object" title="Permalink to this headline">¶</a></h2>
|
||||
</div>
|
||||
<div class="section" id="module-city_model_structure.building">
|
||||
<span id="building"></span><h2>Building<a class="headerlink" href="#module-city_model_structure.building" title="Permalink to this headline">¶</a></h2>
|
||||
<p>CityObject module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2020 Project Author Guille Gutierrez <a class="reference external" href="mailto:guillermo.gutierrezmorote%40concordia.ca">guillermo<span>.</span>gutierrezmorote<span>@</span>concordia<span>.</span>ca</a></p>
|
||||
<dl class="py class">
|
||||
<dt id="city_model_structure.city_object.CityObject">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">city_model_structure.city_object.</code><code class="sig-name descname">CityObject</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">lod</span></em>, <em class="sig-param"><span class="n">surfaces</span></em>, <em class="sig-param"><span class="n">terrains</span></em>, <em class="sig-param"><span class="n">year_of_construction</span></em>, <em class="sig-param"><span class="n">function</span></em>, <em class="sig-param"><span class="n">lower_corner</span></em>, <em class="sig-param"><span class="n">attic_heated</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">basement_heated</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/city_model_structure/city_object.html#CityObject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.city_object.CityObject" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">city_model_structure.building.</code><code class="sig-name descname">Building</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">lod</span></em>, <em class="sig-param"><span class="n">surfaces</span></em>, <em class="sig-param"><span class="n">terrains</span></em>, <em class="sig-param"><span class="n">year_of_construction</span></em>, <em class="sig-param"><span class="n">function</span></em>, <em class="sig-param"><span class="n">lower_corner</span></em>, <em class="sig-param"><span class="n">attic_heated</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">basement_heated</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/city_model_structure/building.html#Building"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.building.Building" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>CityObject class</p>
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.attic_heated">
|
||||
<em class="property">property </em><code class="sig-name descname">attic_heated</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.attic_heated" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.attic_heated">
|
||||
<em class="property">property </em><code class="sig-name descname">attic_heated</code><a class="headerlink" href="#city_model_structure.building.Building.attic_heated" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get if the city object attic is heated
|
||||
:return: Boolean</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.average_storey_height">
|
||||
<em class="property">property </em><code class="sig-name descname">average_storey_height</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.average_storey_height" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.average_storey_height">
|
||||
<em class="property">property </em><code class="sig-name descname">average_storey_height</code><a class="headerlink" href="#city_model_structure.building.Building.average_storey_height" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get city object average storey height in meters
|
||||
:return: float</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.basement_heated">
|
||||
<em class="property">property </em><code class="sig-name descname">basement_heated</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.basement_heated" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.basement_heated">
|
||||
<em class="property">property </em><code class="sig-name descname">basement_heated</code><a class="headerlink" href="#city_model_structure.building.Building.basement_heated" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get if the city object basement is heated
|
||||
:return: Boolean</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.foot_print">
|
||||
<em class="property">property </em><code class="sig-name descname">foot_print</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.foot_print" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.foot_print">
|
||||
<em class="property">property </em><code class="sig-name descname">foot_print</code><a class="headerlink" href="#city_model_structure.building.Building.foot_print" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object foot print surface
|
||||
:return: Surface</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.function">
|
||||
<em class="property">property </em><code class="sig-name descname">function</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.function" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.function">
|
||||
<em class="property">property </em><code class="sig-name descname">function</code><a class="headerlink" href="#city_model_structure.building.Building.function" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object function
|
||||
:return: str</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.heated_volume">
|
||||
<em class="property">property </em><code class="sig-name descname">heated_volume</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.heated_volume" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.heated_volume">
|
||||
<em class="property">property </em><code class="sig-name descname">heated_volume</code><a class="headerlink" href="#city_model_structure.building.Building.heated_volume" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object heated volume in cubic meters
|
||||
:return: float</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.lod">
|
||||
<em class="property">property </em><code class="sig-name descname">lod</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.lod" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.lod">
|
||||
<em class="property">property </em><code class="sig-name descname">lod</code><a class="headerlink" href="#city_model_structure.building.Building.lod" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object level of detail 1, 2, 3 or 4
|
||||
:return: int</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.max_height">
|
||||
<em class="property">property </em><code class="sig-name descname">max_height</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.max_height" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.max_height">
|
||||
<em class="property">property </em><code class="sig-name descname">max_height</code><a class="headerlink" href="#city_model_structure.building.Building.max_height" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object maximal height in meters
|
||||
:return: float</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.name">
|
||||
<em class="property">property </em><code class="sig-name descname">name</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.name" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.name">
|
||||
<em class="property">property </em><code class="sig-name descname">name</code><a class="headerlink" href="#city_model_structure.building.Building.name" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object name
|
||||
:return: str</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.stl_export">
|
||||
<code class="sig-name descname">stl_export</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">path</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/city_model_structure/city_object.html#CityObject.stl_export"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.city_object.CityObject.stl_export" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.stl_export">
|
||||
<code class="sig-name descname">stl_export</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">path</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/city_model_structure/building.html#Building.stl_export"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.building.Building.stl_export" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Export the city object to stl file (city_object_name.stl) to the given path
|
||||
:param path: str
|
||||
:return: None</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.storeys_above_ground">
|
||||
<em class="property">property </em><code class="sig-name descname">storeys_above_ground</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.storeys_above_ground" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.storeys_above_ground">
|
||||
<em class="property">property </em><code class="sig-name descname">storeys_above_ground</code><a class="headerlink" href="#city_model_structure.building.Building.storeys_above_ground" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get city object storeys number above ground
|
||||
:return: int</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.surface">
|
||||
<code class="sig-name descname">surface</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span> → Optional<span class="p">[</span><a class="reference internal" href="#city_model_structure.surface.Surface" title="city_model_structure.surface.Surface">city_model_structure.surface.Surface</a><span class="p">]</span><a class="reference internal" href="_modules/city_model_structure/city_object.html#CityObject.surface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.city_object.CityObject.surface" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.surface">
|
||||
<code class="sig-name descname">surface</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span> → Optional<span class="p">[</span><a class="reference internal" href="#city_model_structure.surface.Surface" title="city_model_structure.surface.Surface">city_model_structure.surface.Surface</a><span class="p">]</span><a class="reference internal" href="_modules/city_model_structure/building.html#Building.surface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.building.Building.surface" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get the city object surface with a given name
|
||||
:param name: str
|
||||
:return: None or Surface</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.surfaces">
|
||||
<em class="property">property </em><code class="sig-name descname">surfaces</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.surfaces" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.surfaces">
|
||||
<em class="property">property </em><code class="sig-name descname">surfaces</code><a class="headerlink" href="#city_model_structure.building.Building.surfaces" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object surfaces
|
||||
:return: [Surface]</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.terrains">
|
||||
<em class="property">property </em><code class="sig-name descname">terrains</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.terrains" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.terrains">
|
||||
<em class="property">property </em><code class="sig-name descname">terrains</code><a class="headerlink" href="#city_model_structure.building.Building.terrains" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get city object terrain surfaces
|
||||
:return: [Surface]</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.thermal_zones">
|
||||
<em class="property">property </em><code class="sig-name descname">thermal_zones</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.thermal_zones" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.thermal_zones">
|
||||
<em class="property">property </em><code class="sig-name descname">thermal_zones</code><a class="headerlink" href="#city_model_structure.building.Building.thermal_zones" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object thermal zones
|
||||
:return: [ThermalZone]</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.type">
|
||||
<em class="property">property </em><code class="sig-name descname">type</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.type" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.type">
|
||||
<em class="property">property </em><code class="sig-name descname">type</code><a class="headerlink" href="#city_model_structure.building.Building.type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object type
|
||||
:return: str</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.usage_zones">
|
||||
<em class="property">property </em><code class="sig-name descname">usage_zones</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.usage_zones" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.usage_zones">
|
||||
<em class="property">property </em><code class="sig-name descname">usage_zones</code><a class="headerlink" href="#city_model_structure.building.Building.usage_zones" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get city object usage zones
|
||||
:return: [UsageZone]</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.volume">
|
||||
<em class="property">property </em><code class="sig-name descname">volume</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.volume" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.volume">
|
||||
<em class="property">property </em><code class="sig-name descname">volume</code><a class="headerlink" href="#city_model_structure.building.Building.volume" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object volume in cubic meters
|
||||
:return: float</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.city_object.CityObject.year_of_construction">
|
||||
<em class="property">property </em><code class="sig-name descname">year_of_construction</code><a class="headerlink" href="#city_model_structure.city_object.CityObject.year_of_construction" title="Permalink to this definition">¶</a></dt>
|
||||
<dt id="city_model_structure.building.Building.year_of_construction">
|
||||
<em class="property">property </em><code class="sig-name descname">year_of_construction</code><a class="headerlink" href="#city_model_structure.building.Building.year_of_construction" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>City object year of construction
|
||||
:return: int</p>
|
||||
</dd></dl>
|
||||
|
@ -470,6 +501,14 @@ Copyright © 2020 Project Author Guille Gutierrez <a class="reference external"
|
|||
<dt id="city_model_structure.polyhedron.Polyhedron">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">city_model_structure.polyhedron.</code><code class="sig-name descname">Polyhedron</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">surfaces</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/city_model_structure/polyhedron.html#Polyhedron"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.polyhedron.Polyhedron" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Polyhedron class</p>
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.polyhedron.Polyhedron.export">
|
||||
<code class="sig-name descname">export</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">full_path</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/city_model_structure/polyhedron.html#Polyhedron.export"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.polyhedron.Polyhedron.export" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Export the polyhedron to stl given file
|
||||
:param full_path: str
|
||||
:return: None</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.polyhedron.Polyhedron.faces">
|
||||
<em class="property">property </em><code class="sig-name descname">faces</code><a class="headerlink" href="#city_model_structure.polyhedron.Polyhedron.faces" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -484,14 +523,6 @@ Copyright © 2020 Project Author Guille Gutierrez <a class="reference external"
|
|||
:return: float</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.polyhedron.Polyhedron.save">
|
||||
<code class="sig-name descname">save</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">full_path</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/city_model_structure/polyhedron.html#Polyhedron.save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#city_model_structure.polyhedron.Polyhedron.save" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Export the polyhedron to stl given file
|
||||
:param full_path: str
|
||||
:return: None</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="city_model_structure.polyhedron.Polyhedron.vertices">
|
||||
<em class="property">property </em><code class="sig-name descname">vertices</code><a class="headerlink" href="#city_model_structure.polyhedron.Polyhedron.vertices" title="Permalink to this definition">¶</a></dt>
|
||||
|
|
BIN
docs/build/html/objects.inv
vendored
BIN
docs/build/html/objects.inv
vendored
Binary file not shown.
5
docs/build/html/py-modindex.html
vendored
5
docs/build/html/py-modindex.html
vendored
|
@ -118,6 +118,11 @@
|
|||
<td>
|
||||
<code class="xref">city_model_structure</code></td><td>
|
||||
<em></em></td></tr>
|
||||
<tr class="cg-1">
|
||||
<td></td>
|
||||
<td>   
|
||||
<a href="index.html#module-city_model_structure.building"><code class="xref">city_model_structure.building</code></a></td><td>
|
||||
<em></em></td></tr>
|
||||
<tr class="cg-1">
|
||||
<td></td>
|
||||
<td>   
|
||||
|
|
2
docs/build/html/searchindex.js
vendored
2
docs/build/html/searchindex.js
vendored
File diff suppressed because one or more lines are too long
|
@ -14,7 +14,7 @@
|
|||
#
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('/home/daimon/Projects/MonthlyEnergyBalance/venv/lib/python3.7/site-packages'))
|
||||
sys.path.insert(0, os.path.abspath('/home/daimon/Projects/Concordia/libs/venv/lib/python3.7/site-packages'))
|
||||
sys.path.insert(0, os.path.abspath('../..'))
|
||||
|
||||
sys.setrecursionlimit(1500)
|
||||
|
@ -60,7 +60,7 @@ templates_path = ['_templates']
|
|||
# You can specify multiple suffix as a list of string:
|
||||
#
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = '.rst'
|
||||
source_suffix = ['.rst', '.md']
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
|
|
@ -30,6 +30,12 @@ City Object
|
|||
.. automodule:: city_model_structure.city_object
|
||||
:members:
|
||||
|
||||
Building
|
||||
********************
|
||||
.. automodule:: city_model_structure.building
|
||||
:members:
|
||||
|
||||
|
||||
Internal Gains
|
||||
********************
|
||||
.. automodule:: city_model_structure.internal_gains
|
||||
|
|
4
pylintrc
4
pylintrc
|
@ -10,11 +10,11 @@ fail-under=10
|
|||
|
||||
# Add files or directories to the blacklist. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS
|
||||
ignore=CVS, conf
|
||||
|
||||
# Add files or directories matching the regex patterns to the blacklist. The
|
||||
# regex matches against base names, not paths.
|
||||
ignore-patterns=
|
||||
ignore-patterns=docs.source.conf
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
|
|
Loading…
Reference in New Issue
Block a user