diff --git a/imports/geometry/gpandas.py b/imports/geometry/gpandas.py index 5edbe0c6..d716c8cf 100644 --- a/imports/geometry/gpandas.py +++ b/imports/geometry/gpandas.py @@ -58,10 +58,10 @@ class GPandas: if self._city is None: self._city = City(self._lower_corner, self._upper_corner, self._srs_name) for scene_index, bldg in self._scene.iterrows(): - geom = bldg.geom - polygon = ShapelyPoly(geom['coordinates'][0]) - height = float(bldg['height_mean']) - building_mesh = trimesh.creation.extrude_polygon(polygon, height) + geometry = bldg.geometry + # polygon = ShapelyPoly(geometry['coordinates'][0]) + height = float(bldg['height']) + building_mesh = trimesh.creation.extrude_polygon(geometry, height) trimesh.repair.fill_holes(building_mesh) trimesh.repair.fix_winding(building_mesh) year_of_construction = int(bldg['year_built']) diff --git a/imports/geometry_factory.py b/imports/geometry_factory.py index e9daa30b..eec1e130 100644 --- a/imports/geometry_factory.py +++ b/imports/geometry_factory.py @@ -17,7 +17,7 @@ class GeometryFactory: """ GeometryFactory class """ - def __init__(self, file_type, path, data_frame=None): + def __init__(self, file_type, path=None, data_frame=None): self._file_type = '_' + file_type.lower() self._path = path self._data_frame = data_frame @@ -46,6 +46,7 @@ class GeometryFactory: """ if self._data_frame is None: self._data_frame = geopandas.read_file(self._path) + print( self._data_frame ) return GPandas(self._data_frame).city @property