SRA update and release changes

This commit is contained in:
Guille Gutierrez 2023-05-26 11:20:10 -04:00
parent 9f00208cbb
commit 08f44fc935
2 changed files with 5 additions and 5 deletions

View File

@ -8,6 +8,7 @@ Code contributors: Peter Yefi peteryefi@gmail.com
from __future__ import annotations
import bz2
import logging
import sys
import pickle
import math
@ -70,10 +71,9 @@ class City:
if self._srs_name in GeometryHelper.srs_transformations.keys():
self._srs_name = GeometryHelper.srs_transformations[self._srs_name]
input_reference = pyproj.CRS(self.srs_name) # Projected coordinate system from input data
except pyproj.exceptions.CRSError:
sys.stderr.write('Invalid projection reference system, please check the input data. '
'(e.g. in CityGML files: srs_name)\n')
sys.exit()
except pyproj.exceptions.CRSError as err:
logging.error('Invalid projection reference system, please check the input data. (e.g. in CityGML files: srs_name)')
raise pyproj.exceptions.CRSError from err
transformer = Transformer.from_crs(input_reference, gps)
coordinates = transformer.transform(self.lower_corner[0], self.lower_corner[1])
self._location = GeometryHelper.get_location(coordinates[0], coordinates[1])

View File

@ -61,8 +61,8 @@ setup(
'hub.exports.energy_systems',
'hub.exports.formats',
'hub.helpers',
'hub.helpers.peak_calculation',
'hub.helpers.data',
'hub.hub_logger',
'hub.imports',
'hub.imports.construction',
'hub.imports.construction.helpers',