MapReader icon indicating copy to clipboard operation
MapReader copied to clipboard

Replace pandas with geopandas wherever possible in MapReader code

Open rwood-97 opened this issue 8 months ago • 0 comments

Is your feature request related to a problem? Please describe. At the moment, we convert our images dictionary to simple pandas dataframes (e.g. convert_images or behind the scenes) in most cases. It would be useful to convert to geodataframes wherever possible to improve geo functionality.

This might also make plotting functions easier (e.g. could remove show and replace with geopandas geodataframe.plot() methods.

Examples of places/methods this would be useful:

  • convert_images should output geodataframes using either pixel_bounds as geometry or polygon/coordinates if available
  • add_metadata should also accept geodataframe
  • save_to_geojson (uses convert_images)
  • annotation tool
  • datasets and load_annotations
  • postprocessing
  • text spotting code (i.e. both runners)

Describe the solution you'd like Instances of pd.DataFrame should be GeoDataFrame if possible. Especially if dataframe is returned to user.

rwood-97 avatar May 28 '24 08:05 rwood-97