From 37c97892d05861a59c7b5f88be0b3d413e6f8f8a Mon Sep 17 00:00:00 2001 From: Rosie Wood Date: Mon, 18 Nov 2024 11:52:34 +0000 Subject: [PATCH 1/3] update default for add_id in plot methods --- mapreader/download/sheet_downloader.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mapreader/download/sheet_downloader.py b/mapreader/download/sheet_downloader.py index ae2d6348..b466f853 100644 --- a/mapreader/download/sheet_downloader.py +++ b/mapreader/download/sheet_downloader.py @@ -1127,7 +1127,7 @@ def plot_features_on_map( self, features: gpd.GeoDataFrame, map_extent: str | (list | tuple) | None = None, - add_id: bool | None = True, + add_id: bool = False, ) -> None: """ Plot boundaries of map sheets on a map using cartopy. @@ -1142,7 +1142,7 @@ def plot_features_on_map( If None, the map extent will be set automatically. By default None. add_id : bool, optional - Whether to add an ID (WFS ID number) to each map sheet, by default True. + Whether to add an ID (WFS ID number) to each map sheet, by default False. """ plt.figure(figsize=[15, 15]) @@ -1184,7 +1184,7 @@ def plot_features_on_map( def plot_all_metadata_on_map( self, map_extent: str | (list | tuple) | None = None, - add_id: bool | None = True, + add_id: bool = False, ) -> None: """ Plots boundaries of all map sheets in metadata on a map using cartopy. @@ -1199,7 +1199,7 @@ def plot_all_metadata_on_map( If None, the map extent will be set automatically. By default None. add_id : bool, optional - Whether to add an ID (WFS ID number) to each map sheet, by default True. + Whether to add an ID (WFS ID number) to each map sheet, by default False. """ self.plot_features_on_map(self.metadata, map_extent, add_id) @@ -1207,7 +1207,7 @@ def plot_all_metadata_on_map( def plot_queries_on_map( self, map_extent: str | (list | tuple) | None = None, - add_id: bool | None = True, + add_id: bool = False, ) -> None: """ Plots boundaries of query results on a map using cartopy. @@ -1222,7 +1222,7 @@ def plot_queries_on_map( If None, the map extent will be set automatically. By default None. add_id : bool, optional - Whether to add an ID (WFS ID number) to each map sheet, by default True. + Whether to add an ID (WFS ID number) to each map sheet, by default False. """ self.plot_features_on_map(self.found_queries, map_extent, add_id) From a10e47a51fa60ac9e7419f8e75f61ab5a1c5f1df Mon Sep 17 00:00:00 2001 From: Rosie Wood Date: Mon, 18 Nov 2024 11:57:02 +0000 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe34af37..c77a9500 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ The following table shows which versions of MapReader are compatible with which _Add new changes here_ +### Changed + +- Default value for `add_id` argument when plotting metadata in `SheetDownloader` is now `False` ([#529](https://github.com/maps-as-data/MapReader/pull/529)) + ## [v1.5.1](https://github.com/Living-with-machines/MapReader/releases/tag/v1.5.1) (2024-10-30) ## Added From c5ab25014ec844c9ce9ca2fa2a8c2180822fb028 Mon Sep 17 00:00:00 2001 From: Rosie Wood Date: Mon, 18 Nov 2024 11:59:09 +0000 Subject: [PATCH 3/3] fix CHANGELOG.md --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c89da81..a3882be0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,9 +27,6 @@ _Add new changes here_ - Metrics are now stored in a nested dictionary (e.g. `metrics['train']['loss']` instead of `metrics["epoch_loss_train]`) ([#511](https://github.com/maps-as-data/MapReader/pull/511)) - `plot_metric` method is simplified - see updated docs ([#511](https://github.com/maps-as-data/MapReader/pull/511)) - Renamed `show_parent` as `show_patches` ([#511](https://github.com/maps-as-data/MapReader/pull/511)) - -### Changed - - Default value for `add_id` argument when plotting metadata in `SheetDownloader` is now `False` ([#529](https://github.com/maps-as-data/MapReader/pull/529)) ## [v1.5.1](https://github.com/Living-with-machines/MapReader/releases/tag/v1.5.1) (2024-10-30)