Skip to content

Commit

Permalink
Merge pull request #529 from maps-as-data/fix_add_id_download
Browse files Browse the repository at this point in the history
Update default for add_id in plot methods
  • Loading branch information
rwood-97 authored Nov 18, 2024
2 parents 0999cf3 + c5ab250 commit 05f7690
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ _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))
- 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)

Expand Down
12 changes: 6 additions & 6 deletions mapreader/download/sheet_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,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.
Expand All @@ -1146,7 +1146,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])

Expand Down Expand Up @@ -1188,7 +1188,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.
Expand All @@ -1203,15 +1203,15 @@ 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)

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.
Expand All @@ -1226,7 +1226,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)

0 comments on commit 05f7690

Please sign in to comment.