diff --git a/bufr2geojson/__init__.py b/bufr2geojson/__init__.py index cd5ede3..39c63e6 100644 --- a/bufr2geojson/__init__.py +++ b/bufr2geojson/__init__.py @@ -280,7 +280,7 @@ def get_location(self) -> Union[dict, None]: LOGGER.warning("longitude set to None") longitude = None else: - longitude = self.qualifiers["06"]["longitude"] + longitude = deepcopy(self.qualifiers["06"]["longitude"]) if longitude is not None: # check if we need to add a displacement @@ -292,7 +292,7 @@ def get_location(self) -> Union[dict, None]: # now station elevation if "height_of_station_ground_above_mean_sea_level" in self.qualifiers["07"]: # noqa - elevation = self.qualifiers["07"]["height_of_station_ground_above_mean_sea_level"] # noqa + elevation = deepcopy(self.qualifiers["07"]["height_of_station_ground_above_mean_sea_level"]) # noqa elevation = round(elevation["value"], elevation["attributes"]["scale"]) # noqa else: elevation = None @@ -313,7 +313,6 @@ def get_location(self) -> Union[dict, None]: if None in location: LOGGER.debug('geometry contains null values; setting to None') return None - return { "type": "Point", "coordinates": location