Skip to content

Commit

Permalink
Fixing comments from review #2
Browse files Browse the repository at this point in the history
  • Loading branch information
shradhasehgal committed Mar 30, 2023
1 parent 69145b7 commit 467d9ab
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion docs/api/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ iNaturalist

.. autoclass:: INaturalist

L8Biome
^^^^^^^

.. autoclass:: L8Biome

LandCover.ai Geo
^^^^^^^^^^^^^^^^

Expand All @@ -113,7 +118,6 @@ Landsat
.. autoclass:: Landsat3
.. autoclass:: Landsat2
.. autoclass:: Landsat1
.. autoclass:: L8Biome

NAIP
^^^^
Expand Down
2 changes: 1 addition & 1 deletion docs/api/geo_datasets.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Dataset,Type,Source,Size (px),Resolution (m)
`iNaturalist`_,Points,Citizen Scientists,-,-
`LandCover.ai Geo`_,"Imagery, Masks",Aerial,"4,200--9,500",0.25--0.5
`Landsat`_,Imagery,Landsat,"8,900x8,900",30
`L8Biome`_,"Imagery, Masks",Landsat,"8,900x8,900",30
`L8Biome`_,"Imagery, Masks",Landsat,"8,900x8,900","15,30"
`NAIP`_,Imagery,Aerial,"6,100x7,600",1
`Open Buildings`_,Geometries,"Maxar, CNES/Airbus",-,-
`Sentinel`_,Imagery,Sentinel,"10,000x10,000",10
2 changes: 1 addition & 1 deletion torchgeo/datamodules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"FAIR1MDataModule",
"GID15DataModule",
"InriaAerialImageLabelingDataModule",
"LandCoverAIDataModule",
"L8BiomeDataModule",
"LandCoverAIDataModule",
"LoveDADataModule",
"NASAMarineDebrisDataModule",
"OSCDDataModule",
Expand Down
8 changes: 4 additions & 4 deletions torchgeo/datasets/l8biome.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class L8Biome(RasterDataset):
Dataset format:
* Each cloud mask is in ENVI binary format.
Includes all bands from the original Landsat Level-1 data product (GeoTIFF), and its associated Level-1 metadata (MTL.txt file)
Expand All @@ -37,7 +38,6 @@ class L8Biome(RasterDataset):
"""

url = "https://huggingface.co/datasets/torchgeo/l8biome/blob/main/{}.tar.gz"
# redistributed from https://landsat.usgs.gov/landsat-8-cloud-cover-assessment-validation-data

filenames_to_md5 = {
"barren": "bb446fda3f6af50930849bb135e99f9c",
Expand All @@ -59,7 +59,7 @@ class L8Biome(RasterDataset):
}

filename_glob = "LC*_B2.TIF"
targz_file_glob = "*.tar.gz"
targz_file_extension = "*.tar.gz"

def __init__(
self,
Expand Down Expand Up @@ -111,7 +111,7 @@ def _verify(self) -> None:
return

# Check if the tar.gz files have already been downloaded
pathname = os.path.join(self.root, self.targz_file_glob)
pathname = os.path.join(self.root, self.targz_file_extension)
if glob.glob(pathname):
self._extract()
return
Expand All @@ -137,7 +137,7 @@ def _download(self) -> None:

def _extract(self) -> None:
"""Extract the dataset."""
pathname = os.path.join(self.root, self.targz_file_glob)
pathname = os.path.join(self.root, self.targz_file_extension)
for tarfile in glob.iglob(pathname):
extract_archive(tarfile)

Expand Down

0 comments on commit 467d9ab

Please sign in to comment.