diff --git a/imports/geometry_factory.py b/imports/geometry_factory.py index eec1e130..51683847 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=None, data_frame=None): + def __init__(self, file_type, path, data_frame=None): self._file_type = '_' + file_type.lower() self._path = path self._data_frame = data_frame diff --git a/unittests/test_geometry_factory.py b/unittests/test_geometry_factory.py index a35c1d86..dc6381d5 100644 --- a/unittests/test_geometry_factory.py +++ b/unittests/test_geometry_factory.py @@ -36,7 +36,7 @@ class TestGeometryFactory(TestCase): def _get_geojson(self, file): file_path = (self._example_path / file).resolve() - self._city = GeometryFactory('gpandas', file_path).city_debug + self._city = GeometryFactory('gpandas', path=file_path).city self.assertIsNotNone(self._city, 'city is none') return self._city diff --git a/unittests/tests_data/sample.geojson b/unittests/tests_data/sample.geojson index 254542b3..3b1f2eca 100644 --- a/unittests/tests_data/sample.geojson +++ b/unittests/tests_data/sample.geojson @@ -10,7 +10,7 @@ }, "properties": { "geom": {"type": "Polygon", "crs": {"type": "name", "properties": {"name": "urn:ogc:def:crs:EPSG::4326"}}, "coordinates": [[[3849322.0855625975, 6060583.24800576], [3849326.3956304314, 6060584.796717078], [3849327.0180495544, 6060583.089519385], [3849333.725799462, 6060585.837955164], [3849328.71788522, 6060598.03498192], [3849317.850609142, 6060593.57976506], [3849322.0855625975, 6060583.24800576]]]}, - "height_mean": 13.0790429485, + "height": 13.0790429485, "year_built": 2000 } }