torchgeo icon indicating copy to clipboard operation
torchgeo copied to clipboard

Add/fix plot methods to Datasets

Open calebrob6 opened this issue 3 years ago • 4 comments

The following benchmark datasets need plot(...) methods:

  • [x] ADVANCE (#264)
  • [x] BeninSmallHolderCashews (#264)
  • [x] BigEarthNet (#264)
  • [x] COWC (#300)
  • [x] CV4AKenyaCropType (#312)
  • [x] TropicalCycloneWindEstimation (#298)
  • [x] GID15 (#288)
  • [x] LEVIRCDPlus (#335)
  • [ ] VHR10
  • [x] PatternNet (#314)
  • [x] SEN12MS (#320)
  • [x] SpaceNet (#252, #311)
  • [x] ZueriCrop (#334)

Further, the plot(...) methods of RasterDataset and VectorDataset need to be removed, and added individually to:

  • [x] CanadianBuildingFootprints (#410)
  • [x] CDL (#415)
  • [x] NAIP (#407)
  • [x] Landsat (#661)
  • [ ] ChesapeakeCVPR
  • [x] Sentinel (#416)

The ChesapeakeCVPR dataset is a bit of an outlier as it is a GeoDataset. I need to think more about that.

calebrob6 avatar Nov 19 '21 20:11 calebrob6

Further, the plot(...) methods of RasterDataset and VectorDataset need to be reworked or removed.

I would like to move those plot methods from RasterDataset/VectorDataset to the individual dataset classes since there is so much diversity. When that happens, we'll need to change them to accept a sample instead of an image.

adamjstewart avatar Nov 19 '21 20:11 adamjstewart

@calebrob6 I've added the plot method to the SpaceNet baseclass so all currently implemented SpaceNet datasets (1,2,4,7) can be plotted.

ashnair1 avatar Nov 19 '21 20:11 ashnair1

How should we handle plotting for IntersectionDataset/UnionDataset?

adamjstewart avatar Nov 25 '21 22:11 adamjstewart

How should we handle plotting for IntersectionDataset/UnionDataset?

If you aren't doing anything too crazy, you should be able to send the samples that you get from the joined dataset to the individual dataset.plot(...) methods. For example, with the Landsat8 & CDL dataset, you will be able to call both the Landast8 and CDL plot methods with the resulting samples. You could get crazy and make an IntersectionDataset.plot(...) that calls each sub-datasets's plot method and stitches together the resulting plt.Figures into some Frankenstein monster.

calebrob6 avatar Dec 02 '21 08:12 calebrob6

@calebrob6 ChesapeakeCVPR is the only remaining dataset without a plot method if you want to take a stab at this.

Our point datasets (GBIF, iNaturalist, EDDMapS) also don't have plot methods. Not sure if we want to bother with them or not. If we did, I would probably want to use cartopy to make the plots more interesting.

adamjstewart avatar Sep 30 '22 19:09 adamjstewart

Technically not done yet, we're still waiting on VHR-10

adamjstewart avatar Dec 09 '22 23:12 adamjstewart