Skip to content

Commit

Permalink
Merge pull request #544 from maps-as-data/explore_fix
Browse files Browse the repository at this point in the history
Bug fix explore methods
  • Loading branch information
rwood-97 authored Jan 3, 2025
2 parents 489cfdc + 50be8dc commit 1c98024
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ The following table shows which versions of MapReader are compatible with which

_Add new changes here_

### Fixed
- Fixes the `explore_predictions` and `explore_search_results` methods in the `DeepSoloRunner` and `MapTextRunner` classes ([#544](https://github.com/maps-as-data/MapReader/pull/544))

## [v1.6.2](https://github.com/Living-with-machines/MapReader/releases/tag/v1.6.2) (2025-01-02)

### Added
Expand Down
6 changes: 6 additions & 0 deletions mapreader/spot_text/runner_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ def explore_predictions(
tiles = xyz.providers.OpenStreetMap.Mapnik

preds_df = self._dict_to_dataframe(self.geo_predictions)
preds_df.drop(
columns=["pixel_geometry"], inplace=True
) # drop pixel_geometry since we can't have two polygon columns

return preds_df[preds_df["image_id"] == parent_id].explore(
tiles=tiles,
Expand Down Expand Up @@ -1059,6 +1062,9 @@ def explore_search_results(

geo_search_results = self._get_geo_search_results()
geo_df = self._dict_to_dataframe(geo_search_results)
geo_df.drop(
columns=["pixel_geometry"], inplace=True
) # drop pixel_geometry since we can't have two polygon columns

return geo_df[geo_df["image_id"] == parent_id].explore(
tiles=tiles,
Expand Down

0 comments on commit 1c98024

Please sign in to comment.