forked from s_ranjbar/city_retrofit
SRA update and release changes
This commit is contained in:
parent
9f00208cbb
commit
08f44fc935
@ -8,6 +8,7 @@ Code contributors: Peter Yefi peteryefi@gmail.com
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import bz2
|
import bz2
|
||||||
|
import logging
|
||||||
import sys
|
import sys
|
||||||
import pickle
|
import pickle
|
||||||
import math
|
import math
|
||||||
@ -70,10 +71,9 @@ class City:
|
|||||||
if self._srs_name in GeometryHelper.srs_transformations.keys():
|
if self._srs_name in GeometryHelper.srs_transformations.keys():
|
||||||
self._srs_name = GeometryHelper.srs_transformations[self._srs_name]
|
self._srs_name = GeometryHelper.srs_transformations[self._srs_name]
|
||||||
input_reference = pyproj.CRS(self.srs_name) # Projected coordinate system from input data
|
input_reference = pyproj.CRS(self.srs_name) # Projected coordinate system from input data
|
||||||
except pyproj.exceptions.CRSError:
|
except pyproj.exceptions.CRSError as err:
|
||||||
sys.stderr.write('Invalid projection reference system, please check the input data. '
|
logging.error('Invalid projection reference system, please check the input data. (e.g. in CityGML files: srs_name)')
|
||||||
'(e.g. in CityGML files: srs_name)\n')
|
raise pyproj.exceptions.CRSError from err
|
||||||
sys.exit()
|
|
||||||
transformer = Transformer.from_crs(input_reference, gps)
|
transformer = Transformer.from_crs(input_reference, gps)
|
||||||
coordinates = transformer.transform(self.lower_corner[0], self.lower_corner[1])
|
coordinates = transformer.transform(self.lower_corner[0], self.lower_corner[1])
|
||||||
self._location = GeometryHelper.get_location(coordinates[0], coordinates[1])
|
self._location = GeometryHelper.get_location(coordinates[0], coordinates[1])
|
||||||
|
2
setup.py
2
setup.py
@ -61,8 +61,8 @@ setup(
|
|||||||
'hub.exports.energy_systems',
|
'hub.exports.energy_systems',
|
||||||
'hub.exports.formats',
|
'hub.exports.formats',
|
||||||
'hub.helpers',
|
'hub.helpers',
|
||||||
|
'hub.helpers.peak_calculation',
|
||||||
'hub.helpers.data',
|
'hub.helpers.data',
|
||||||
'hub.hub_logger',
|
|
||||||
'hub.imports',
|
'hub.imports',
|
||||||
'hub.imports.construction',
|
'hub.imports.construction',
|
||||||
'hub.imports.construction.helpers',
|
'hub.imports.construction.helpers',
|
||||||
|
Loading…
Reference in New Issue
Block a user